diff --git a/monstage/models.py b/monstage/models.py index e81e98f..0df6aaf 100644 --- a/monstage/models.py +++ b/monstage/models.py @@ -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)