69b0b13ad3
- PEP8 - Fichiers inutilisés
27 lines
1,019 B
Python
27 lines
1,019 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from django.db import models
|
|
from django.contrib.auth.models import User
|
|
|
|
|
|
class ErnestoUser(models.Model):
|
|
user = models.OneToOneField(User, related_name="profile")
|
|
is_ernesto = models.BooleanField("Membre de l'Ernestophone", default=True)
|
|
is_chef = models.BooleanField("Chef Fanfare", default=False)
|
|
phone = models.CharField("Téléphone", max_length=20, blank=True)
|
|
instru = models.CharField("Instrument joué", max_length=40, blank=True)
|
|
slug = models.CharField(max_length=7, editable=False, unique=True)
|
|
doodlename = models.CharField("Nom pour le doodle", max_length=30,
|
|
blank=True)
|
|
mails = models.BooleanField("Recevoir les mails", default=True)
|
|
|
|
class Meta:
|
|
verbose_name = "Profil Ernestophoniste"
|
|
verbose_name_plural = "Profil Ernestophoniste"
|
|
|
|
def __unicode__(self):
|
|
return unicode(self.user.username)
|
|
|
|
def __str__(self):
|
|
return self.user.username
|
|
# Create your models here.
|