From 387ca01ddab1a1f44b33a587a3588359de2283f5 Mon Sep 17 00:00:00 2001 From: champeno Date: Mon, 25 May 2015 00:27:04 +0200 Subject: [PATCH] Handle new CAS accounts --- monstage/models.py | 4 ++++ 1 file changed, 4 insertions(+) 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)