2015-03-17 19:03:51 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from django.db import models
|
|
|
|
from django.contrib.auth.models import User
|
|
|
|
|
2016-07-14 01:58:52 +02:00
|
|
|
|
2015-03-17 19:03:51 +01:00
|
|
|
class ErnestoUser(models.Model):
|
2018-01-04 23:43:10 +01:00
|
|
|
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="profile")
|
2015-03-17 19:03:51 +01:00
|
|
|
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)
|
2015-07-22 22:08:59 +02:00
|
|
|
slug = models.CharField(max_length=7, editable=False, unique=True)
|
2016-07-14 01:58:52 +02:00
|
|
|
doodlename = models.CharField("Nom pour le doodle", max_length=30,
|
|
|
|
blank=True)
|
2016-06-21 00:33:32 +02:00
|
|
|
mails = models.BooleanField("Recevoir les mails", default=True)
|
2015-03-17 19:03:51 +01:00
|
|
|
|
|
|
|
class Meta:
|
|
|
|
verbose_name = "Profil Ernestophoniste"
|
2015-07-22 22:08:59 +02:00
|
|
|
verbose_name_plural = "Profil Ernestophoniste"
|
2015-03-17 19:03:51 +01:00
|
|
|
|
2015-07-22 22:08:59 +02:00
|
|
|
def __str__(self):
|
|
|
|
return self.user.username
|
2015-03-17 19:03:51 +01:00
|
|
|
# Create your models here.
|