]> git.parisson.com Git - teleforma.git/commitdiff
fix user activation after subscribed
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 16 Jul 2015 09:51:46 +0000 (11:51 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 16 Jul 2015 09:51:46 +0000 (11:51 +0200)
example/settings.py
teleforma/management/commands/teleforma-send-subscription-email.py
teleforma/views/crfpa.py

index 5d0ed15868fb6c2ca2e86afeec4cbfadd798f898..534a6796447bde0af761ec5f3675dc37b2560404 100644 (file)
@@ -161,7 +161,6 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     "django.core.context_processors.media",
     'django.core.context_processors.static',
     "teleforma.context_processors.periods",
-    "teleforma.exam.context_processors.exam_access",
 )
 
 TELEMETA_ORGANIZATION = 'Pre-Barreau - CRFPA'
index dcbb33532b4d17b13d8943fda18314f6910b768e..e1233b846ac3628883ef7e6f60c4128bcb923bab 100644 (file)
@@ -57,6 +57,8 @@ class Command(BaseCommand):
                 self.email(student)
                 student.confirmation_sent = True
                 student.save()
+                student.user.is_active = True
+                student.user.save()
                 logger.logger.info('email send : ' + student.user.username)
 
-        logger.logger.info('############## Done #################')
\ No newline at end of file
+        logger.logger.info('############## Done #################')
index 4fd6870d8b40651c1ca9264d1fb9aa19855ec4b0..5673dea6dc326c36657ef343a9f93745180ea5f1 100644 (file)
@@ -350,6 +350,7 @@ class AnnalsView(ListView):
     def get_queryset(self):
         self.user = self.request.user
         self.all_courses = get_courses(self.request.user)
+        print self.all_courses
         return self.get_docs()
 
     def get_context_data(self, **kwargs):