Handle new CAS accounts

This commit is contained in:
champeno 2015-05-25 00:27:04 +02:00
parent 9e07f6806c
commit 387ca01dda

View file

@ -2,6 +2,7 @@ from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from django.contrib.gis.db import models as geomodels
from django_cas_ng.signals import cas_user_authenticated
TYPE_STAGE_CHOICES = (
('stage', _(u"Stage")),
@ -27,6 +28,9 @@ class Normalien(models.Model):
return unicode(self.user.username)
if created:
cas_user_authenticated.connect(create_user_profile)
class Stage(models.Model):
user = models.ForeignKey(Normalien, related_name = "stages")
published = models.BooleanField(_("Visible publiquement"), default = False)