From 668ea0459407f5d7695d1d785aafc54744f75d9f Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 17 Feb 2015 23:30:46 +0100 Subject: [PATCH] update Student model, add subscription bool and email command --- teleforma/admin.py | 15 +--- teleforma/locale/fr/LC_MESSAGES/django.mo | Bin 12778 -> 12841 bytes teleforma/locale/fr/LC_MESSAGES/django.po | 64 ++++++++++-------- .../teleforma-send-subscription-email.py | 62 +++++++++++++++++ ...ount__add_field_student_application_fee.py | 19 ++++-- teleforma/models/crfpa.py | 3 +- .../messages}/email_inscr_internautes.txt | 0 .../messages}/email_inscr_presentiels.txt | 0 .../teleforma/messages/email_inscr_sujet.txt | 1 + 9 files changed, 116 insertions(+), 48 deletions(-) create mode 100644 teleforma/management/commands/teleforma-send-subscription-email.py rename teleforma/templates/{postman => teleforma/messages}/email_inscr_internautes.txt (100%) rename teleforma/templates/{postman => teleforma/messages}/email_inscr_presentiels.txt (100%) create mode 100644 teleforma/templates/teleforma/messages/email_inscr_sujet.txt diff --git a/teleforma/admin.py b/teleforma/admin.py index 02fa16de..57e1d0af 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -17,22 +17,13 @@ class DiscountInline(admin.StackedInline): model = Discount extra = 1 -class CRFPAStudentProfileInline(admin.StackedInline): - model = Student - exclude = ['options'] - filter_horizontal = ['trainings'] - -class AEStudentProfileInline(admin.StackedInline): - model = AEStudent - filter_horizontal = ['courses'] - extra = 1 - class StudentAdmin(admin.ModelAdmin): model = Student exclude = ['options'] + filter_horizontal = ['trainings'] inlines = [PaymentInline, OptionalFeeInline, DiscountInline] search_fields = ['user__first_name', 'user__last_name', 'user__username'] - list_filter = ['user__is_active'] + list_filter = ['user__is_active', 'is_subscribed'] list_display = ['student_name', 'total_payments', 'total_fees', 'balance'] def student_name(self, instance): @@ -53,7 +44,7 @@ class ProfileInline(admin.StackedInline): model = Profile class UserProfileAdmin(UserAdmin): - inlines = [ProfileInline, CRFPAStudentProfileInline] + inlines = [ProfileInline] class TrainingAdmin(admin.ModelAdmin): model = Training diff --git a/teleforma/locale/fr/LC_MESSAGES/django.mo b/teleforma/locale/fr/LC_MESSAGES/django.mo index ca75b0c9e9ecb8fe3096ccc2576cf83f5094e79f..14af0f47a8cc65c8c63b601f7c5e18f33f6aa042 100644 GIT binary patch delta 5722 zcmZA533yId9>?+fMiL2<5{aojh&3`2X{TWfGgMJihT38#Xo4n9g+}Z(w~JcZu@*z^ zHMEx2@=|-PVa(WC)zTsuMyo=#MjJxs`+M*IeV#t<(_cR4oO|v$=bn4tH>qn`s|LE~ zV?yUR9AQ4ksew;MI8FxT7b~jOaW2F;PC2}Yk$4?j;T=rC)GFTjK3JK07M8_P7>=$v z(b}hC80~YAab0Htg$gvRH2oM#eUI0{DMSr;0$H1L8l&(cmdBgOf6hIAXn`@m^7_|6 zEg-?_iKuZ?Q8$!^QOxhOqo9GhS%(bNM46}obIlRf?xOBsGM2$<);IM#4`!Vx8hB3c$gMwCe8@1vR)PkHxz4i*Ii7KH6j6*Fj9<{*6s0F2>#%Y0idaY4A z)fLr01J!>ps^2hl)i8oW;8~$MPPF=T)cLvQQq%%gqxx;eX#5zp;G@=l2G#EphG4Os z|IXS=QP-EP%Km3ls94oo=@`^jO+s~;Zq7rkco}LzD^U}#N8R~ujKM;T#nX1a7&Trg zYP`^DUOfu+sN$-z|JtJZG-!fU?1X8kJ9-T@z%&f(gt^q(SEF`rBWi+eSPA!`9>Hg* z>#m?)@|&psrKtX8-0EJ(3aACtL`_&1b!Sbio{YLM4YjpxPz!w8&i69=p~e}E+M!(3 z#AEIJB-FUmG4ROeP*BH()?p25Wq#Ba?L>7vg1VEF<~h^?uA;X52h_(ff-jLSSQ|A_ zo>_ppek^L-3CKcSXEp_`aK5<`0}DV6uoHDh`%n`eLVX%eVsHEcpT%Z19j6Drj#}_( z)b&MHzk+%s*HH_-A86Oftt82YULeJkER=Hf$6AznW$$z1oaZS zsQ$B1*DpjZXc_7T-banIN$T^zlY$01fZB=Us0q%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?mfGgRNdNoMD1GT PRlD2f)vsz)T#)lKr799j diff --git a/teleforma/locale/fr/LC_MESSAGES/django.po b/teleforma/locale/fr/LC_MESSAGES/django.po index 7986cf68..f752b02f 100644 --- a/teleforma/locale/fr/LC_MESSAGES/django.po +++ b/teleforma/locale/fr/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-17 22:29+0100\n" +"POT-Creation-Date: 2015-02-17 23:30+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Guillaume Pellerin \n" "Language-Team: LANGUAGE \n" @@ -125,7 +125,7 @@ msgid "date added" msgstr "date d'ajout" #: exam/models.py:179 models/core.py:160 models/core.py:463 -#: models/crfpa.py:203 models/pro.py:68 +#: models/crfpa.py:204 models/pro.py:68 msgid "date modified" msgstr "date de modification" @@ -437,7 +437,7 @@ msgstr "" "NB: Ce message est émis par un automate. Ne faites pas de réponse, elle ne " "serait pas prise en compte." -#: models/ae.py:46 models/core.py:206 models/crfpa.py:109 models/crfpa.py:173 +#: models/ae.py:46 models/core.py:206 models/crfpa.py:109 models/crfpa.py:174 #: models/pro.py:101 models/pro.py:140 msgid "user" msgstr "utilisateur" @@ -472,8 +472,8 @@ msgstr "Publié" #: models/core.py:94 models/core.py:107 models/core.py:129 models/core.py:142 #: models/core.py:157 models/core.py:239 models/core.py:394 models/core.py:460 -#: models/core.py:480 models/crfpa.py:48 models/crfpa.py:217 -#: models/crfpa.py:230 models/pro.py:124 +#: models/core.py:480 models/crfpa.py:48 models/crfpa.py:218 +#: models/crfpa.py:231 models/pro.py:124 msgid "description" msgstr "description" @@ -672,98 +672,102 @@ msgid "subscription fees" msgstr "frais d'inscription" #: models/crfpa.py:135 -msgid "subscripted" +msgid "subscribed" msgstr "inscrit" -#: models/crfpa.py:165 +#: models/crfpa.py:136 +msgid "confirmation sent" +msgstr "confirmation envoyée" + +#: models/crfpa.py:166 msgid "Student" msgstr "Etudiant" -#: models/crfpa.py:166 +#: models/crfpa.py:167 msgid "Students" msgstr "Etudiants" -#: models/crfpa.py:174 templates/telemeta/profile_detail.html:77 +#: models/crfpa.py:175 templates/telemeta/profile_detail.html:77 msgid "Address" msgstr "Adresse" -#: models/crfpa.py:175 +#: models/crfpa.py:176 msgid "Postal code" msgstr "Code postal" -#: models/crfpa.py:176 +#: models/crfpa.py:177 msgid "City" msgstr "Ville" -#: models/crfpa.py:177 +#: models/crfpa.py:178 msgid "Country" msgstr "Pays" -#: models/crfpa.py:178 templates/telemeta/profile_detail.html:88 +#: models/crfpa.py:179 templates/telemeta/profile_detail.html:88 msgid "Language" msgstr "Langue" -#: models/crfpa.py:179 templates/telemeta/profile_detail.html:78 +#: models/crfpa.py:180 templates/telemeta/profile_detail.html:78 msgid "Telephone" msgstr "Téléphone" -#: models/crfpa.py:180 +#: models/crfpa.py:181 msgid "Expiration_date" msgstr "Date d'expiration" -#: models/crfpa.py:181 +#: models/crfpa.py:182 msgid "Password initialized" msgstr "Mot de passe initialisé" -#: models/crfpa.py:182 templates/telemeta/profile_detail.html:79 +#: models/crfpa.py:183 templates/telemeta/profile_detail.html:79 msgid "WiFi login" msgstr "" -#: models/crfpa.py:183 +#: models/crfpa.py:184 msgid "WiFi pass" msgstr "" -#: models/crfpa.py:187 +#: models/crfpa.py:188 msgid "profile" msgstr "profil" -#: models/crfpa.py:198 models/crfpa.py:215 models/crfpa.py:228 +#: models/crfpa.py:199 models/crfpa.py:216 models/crfpa.py:229 msgid "student" msgstr "étudiant" -#: models/crfpa.py:199 models/crfpa.py:216 models/crfpa.py:229 +#: models/crfpa.py:200 models/crfpa.py:217 models/crfpa.py:230 msgid "amount" msgstr "montant" -#: models/crfpa.py:200 +#: models/crfpa.py:201 msgid "month" msgstr "mois" -#: models/crfpa.py:201 +#: models/crfpa.py:202 msgid "collected" msgstr "encaissé" -#: models/crfpa.py:202 +#: models/crfpa.py:203 msgid "date created" msgstr "date de création" -#: models/crfpa.py:207 +#: models/crfpa.py:208 msgid "Payment" msgstr "Paiement" -#: models/crfpa.py:208 +#: models/crfpa.py:209 msgid "Payments" msgstr "Paiements" -#: models/crfpa.py:221 +#: models/crfpa.py:222 msgid "Discount" msgstr "Réduction" -#: models/crfpa.py:222 +#: models/crfpa.py:223 msgid "Discounts" msgstr "Réductions" -#: models/crfpa.py:234 models/crfpa.py:235 +#: models/crfpa.py:235 models/crfpa.py:236 msgid "Optional fees" msgstr "Frais optionnels" @@ -1234,7 +1238,7 @@ msgstr "" #: templates/registration/password_reset_confirm.html:3 msgid "Confirm password reset" -msgstr "Conformation de la réinitialisation du mot de passe" +msgstr "Confirmation de la réinitialisation du mot de passe" #: templates/registration/password_reset_confirm.html:5 msgid "Enter your new password below to reset your password:" diff --git a/teleforma/management/commands/teleforma-send-subscription-email.py b/teleforma/management/commands/teleforma-send-subscription-email.py new file mode 100644 index 00000000..887fd23c --- /dev/null +++ b/teleforma/management/commands/teleforma-send-subscription-email.py @@ -0,0 +1,62 @@ +from optparse import make_option +from django.conf import settings +from django.core.management.base import BaseCommand, CommandError +from django.contrib.auth.models import User +from django.contrib.auth.forms import PasswordResetForm +from django.contrib.auth.tokens import default_token_generator +from django.template.defaultfilters import slugify +from django.template.loader import render_to_string +from django.core.mail import send_mail, mail_admins +from django.utils import translation +from telemeta.models import * +from telemeta.util.unaccent import unaccent +from teleforma.models import * +import logging +from postman import * + + +class Logger: + """A logging object""" + + def __init__(self, file): + self.logger = logging.getLogger('teleforma') + self.hdlr = logging.FileHandler(file) + self.formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') + self.hdlr.setFormatter(self.formatter) + self.logger.addHandler(self.hdlr) + self.logger.setLevel(logging.INFO) + + +class Command(BaseCommand): + help = "Send an email to new subscribed student" + language_code = 'fr_FR' + + def email(self, student): + site = Site.objects.get_current() + ctx_dict = {'site': site, 'organization': settings.TELEMETA_ORGANIZATION, 'usr': user} + subject_template = 'teleforma/messages/email_inscr_sujet.txt' + if student.platform_only: + message_template = 'teleforma/messages/email_inscr_internautes.txt' + else: + message_template = 'teleforma/messages/email_inscr_presentiels.txt' + subject = render_to_string(self.subject_template, ctx_dict) + subject = ''.join(subject.splitlines()) + message = render_to_string(self.message_template, ctx_dict) + send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [student.user.email], fail_silently=False) + + def handle(self, *args, **options): + log_file = args[-1] + logger = Logger(log_file) + logger.logger.info('########### Processing #############') + + students = Student.objects.all() + translation.activate(self.language_code) + + for student in students: + if student.is_subscribed and not student.confirmation_sent and not student.user.is_active and student.user.email: + self.email(student) + student.confirmation_sent = True + student.save() + logger.logger.info('email send : ' + student.user.username) + + logger.logger.info('############## Done #################') \ No newline at end of file diff --git a/teleforma/migrations/0072_auto__add_optionalfee__add_discount__add_field_student_application_fee.py b/teleforma/migrations/0072_auto__add_optionalfee__add_discount__add_field_student_application_fee.py index 27574547..8c47783f 100644 --- a/teleforma/migrations/0072_auto__add_optionalfee__add_discount__add_field_student_application_fee.py +++ b/teleforma/migrations/0072_auto__add_optionalfee__add_discount__add_field_student_application_fee.py @@ -36,8 +36,13 @@ class Migration(SchemaMigration): self.gf('telemeta.models.core.FloatField')(default=0, blank=True), keep_default=False) - # Adding field 'Student.subscribed' - db.add_column('teleforma_student', 'subscribed', + # Adding field 'Student.is_subscribed' + db.add_column('teleforma_student', 'is_subscribed', + self.gf('telemeta.models.core.BooleanField')(default=False), + keep_default=False) + + # Adding field 'Student.confirmation_sent' + db.add_column('teleforma_student', 'confirmation_sent', self.gf('telemeta.models.core.BooleanField')(default=False), keep_default=False) @@ -55,8 +60,11 @@ class Migration(SchemaMigration): # Deleting field 'Student.subscription_fees' db.delete_column('teleforma_student', 'subscription_fees') - # Deleting field 'Student.subscribed' - db.delete_column('teleforma_student', 'subscribed') + # Deleting field 'Student.is_subscribed' + db.delete_column('teleforma_student', 'is_subscribed') + + # Deleting field 'Student.confirmation_sent' + db.delete_column('teleforma_student', 'confirmation_sent') models = { @@ -333,8 +341,10 @@ class Migration(SchemaMigration): 'teleforma.student': { 'Meta': {'ordering': "['user__last_name']", 'object_name': 'Student'}, 'application_fees': ('telemeta.models.core.BooleanField', [], {'default': 'False'}), + 'confirmation_sent': ('telemeta.models.core.BooleanField', [], {'default': 'False'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'iej': ('telemeta.models.core.ForeignKey', [], {'related_name': "'student'", 'on_delete': 'models.SET_NULL', 'default': 'None', 'to': "orm['teleforma.IEJ']", 'blank': 'True', 'null': 'True'}), + 'is_subscribed': ('telemeta.models.core.BooleanField', [], {'default': 'False'}), 'options': ('telemeta.models.core.ForeignKey', [], {'default': 'None', 'related_name': "'options'", 'null': 'True', 'blank': 'True', 'to': "orm['teleforma.Course']"}), 'oral_1': ('telemeta.models.core.ForeignKey', [], {'default': 'None', 'related_name': "'oral_1'", 'null': 'True', 'blank': 'True', 'to': "orm['teleforma.Course']"}), 'oral_2': ('telemeta.models.core.ForeignKey', [], {'default': 'None', 'related_name': "'oral_2'", 'null': 'True', 'blank': 'True', 'to': "orm['teleforma.Course']"}), @@ -342,7 +352,6 @@ class Migration(SchemaMigration): 'period': ('telemeta.models.core.ForeignKey', [], {'related_name': "'student'", 'on_delete': 'models.SET_NULL', 'default': 'None', 'to': "orm['teleforma.Period']", 'blank': 'True', 'null': 'True'}), 'platform_only': ('telemeta.models.core.BooleanField', [], {'default': 'False'}), 'procedure': ('telemeta.models.core.ForeignKey', [], {'default': 'None', 'related_name': "'procedure'", 'null': 'True', 'blank': 'True', 'to': "orm['teleforma.Course']"}), - 'subscribed': ('telemeta.models.core.BooleanField', [], {'default': 'False'}), 'subscription_fees': ('telemeta.models.core.FloatField', [], {'default': '0', 'blank': 'True'}), 'trainings': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'student_trainings'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['teleforma.Training']"}), 'user': ('telemeta.models.core.ForeignKey', [], {'related_name': "'student'", 'unique': 'True', 'to': "orm['auth.User']"}), diff --git a/teleforma/models/crfpa.py b/teleforma/models/crfpa.py index 6abfe14d..5b709aa3 100644 --- a/teleforma/models/crfpa.py +++ b/teleforma/models/crfpa.py @@ -132,7 +132,8 @@ class Student(Model): application_fees = BooleanField(_('application fees')) default_application_fees = 40 subscription_fees = FloatField(_('subscription fees')) - subscribed = BooleanField(_('subscribed')) + is_subscribed = BooleanField(_('subscribed')) + confirmation_sent = BooleanField(_('confirmation sent')) def __unicode__(self): try: diff --git a/teleforma/templates/postman/email_inscr_internautes.txt b/teleforma/templates/teleforma/messages/email_inscr_internautes.txt similarity index 100% rename from teleforma/templates/postman/email_inscr_internautes.txt rename to teleforma/templates/teleforma/messages/email_inscr_internautes.txt diff --git a/teleforma/templates/postman/email_inscr_presentiels.txt b/teleforma/templates/teleforma/messages/email_inscr_presentiels.txt similarity index 100% rename from teleforma/templates/postman/email_inscr_presentiels.txt rename to teleforma/templates/teleforma/messages/email_inscr_presentiels.txt diff --git a/teleforma/templates/teleforma/messages/email_inscr_sujet.txt b/teleforma/templates/teleforma/messages/email_inscr_sujet.txt new file mode 100644 index 00000000..35c7e98b --- /dev/null +++ b/teleforma/templates/teleforma/messages/email_inscr_sujet.txt @@ -0,0 +1 @@ +Validation de votre inscription au CRFPA du Pré-Barreau -- 2.39.5