# -*- 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) class Meta: verbose_name = "Profil Ernestophoniste" verbose_name_plural = "Profils Ernestophonistes" def __unicode__(self): return unicode(self.user.username) # Create your models here.