From 1fb4d80d329cd23389c77eeafcaa3e85743bc755 Mon Sep 17 00:00:00 2001 From: yomguy Date: Tue, 5 Jun 2012 01:00:00 +0200 Subject: [PATCH] add payment, fix trans --- teleforma/admin.py | 2 + teleforma/locale/fr/LC_MESSAGES/django.mo | Bin 4291 -> 4209 bytes teleforma/locale/fr/LC_MESSAGES/django.po | 239 ++++++++++++---------- teleforma/models.py | 19 +- teleforma/views.py | 1 + 5 files changed, 153 insertions(+), 108 deletions(-) diff --git a/teleforma/admin.py b/teleforma/admin.py index 2ea8f24c..ac4906f9 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -45,6 +45,8 @@ admin.site.register(Training, TrainingAdmin) admin.site.register(CourseType) admin.site.register(StreamingServer) admin.site.register(LiveStream) +admin.site.register(Payment) + diff --git a/teleforma/locale/fr/LC_MESSAGES/django.mo b/teleforma/locale/fr/LC_MESSAGES/django.mo index 2edd87c975e157eb42a043bab440868f0f31a2ad..708816eadb85aaee73f896eb85a8c3cd22c9203e 100644 GIT binary patch delta 1981 zcmYk6X=qee6vuD2Niq|YxG!-T9czkJ6XO*IA9AgAP6aK!39JrEdf7>ML`hb2mSqL4&vqg@9&)R-aYrcbKgw& z*w^9YKLc`4IL2x;5%J2PrzJw4u;?*$mKeXDX9BhP|x3k z{ovnF&p*rDPr4Tvg#=!~0@w$0U=EJ_e5Mju3c2ON=6`9dhDuluwP7>V`n8bDt+)7A zSc<-BlG_={{__gx5g|S6&`{r za3Cy(!xUGm%Q4jA3drSV80T5M0g}rtxA+>ULN-AiTNG;jJ*a|vpf-AJ{!^$Id=9nl zf2e}`U{XdltF$o4q}B{JKLWL23RD3#P>B~pwYVN?{W8dB%K^680>iK7I5bT9smUHi*HrmXt z;x?%DyP(z|D5C$W=w~J+@SzGgW&U}{<$h&S;#*K1xet}_A=F3p6smJCp*r&(>bVb4 zZyw^N3LORIPk{QUtCJX9uAWI9SOt|}1JnkapbGNf5SV~m?g-N`cnWG=C)5ThsORrO zF4trJ6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diff --git a/teleforma/locale/fr/LC_MESSAGES/django.po b/teleforma/locale/fr/LC_MESSAGES/django.po index 79de5d74..6203864c 100644 --- a/teleforma/locale/fr/LC_MESSAGES/django.po +++ b/teleforma/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-04-27 22:59+0200\n" +"POT-Creation-Date: 2012-06-04 21:37+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,232 +18,243 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" -#: models.py:69 models.py:81 models.py:95 models.py:108 models.py:161 -#: models.py:354 models.py:370 models.py:391 models.py:404 models.py:417 +#: models.py:69 models.py:81 models.py:99 models.py:111 models.py:165 +#: models.py:283 models.py:373 models.py:389 msgid "name" msgstr "nom" -#: models.py:70 models.py:82 models.py:96 models.py:109 models.py:122 -#: models.py:162 models.py:215 models.py:261 models.py:355 +#: models.py:70 models.py:82 models.py:100 models.py:112 models.py:125 +#: models.py:166 models.py:219 models.py:265 models.py:284 models.py:374 msgid "description" msgstr "description" -#: models.py:77 models.py:83 models.py:160 +#: models.py:77 models.py:83 models.py:164 msgid "organization" msgstr "organisation" -#: models.py:90 models.py:120 +#: models.py:94 models.py:123 msgid "department" msgstr "département" -#: models.py:103 models.py:371 models.py:431 -msgid "category" -msgstr "catégorie" +#: models.py:107 models.py:390 models.py:409 +msgid "period" +msgstr "période" -#: models.py:104 -msgid "categories" -msgstr "catégories" - -#: models.py:116 models.py:214 -#, fuzzy -msgid "type" -msgstr "type mime" +#: models.py:119 models.py:126 +msgid "course type" +msgstr "type de matière" -#: models.py:121 models.py:260 +#: models.py:124 models.py:264 msgid "title" msgstr "titre" -#: models.py:123 -msgid "course type" -msgstr "type de matière" - -#: models.py:124 models.py:266 models.py:369 models.py:392 models.py:405 -#: models.py:418 +#: models.py:127 models.py:270 models.py:388 msgid "code" msgstr "cote" -#: models.py:125 models.py:265 +#: models.py:128 models.py:269 msgid "date modified" msgstr "date de modification" -#: models.py:138 models.py:174 +#: models.py:129 +msgid "number" +msgstr "" + +#: models.py:142 models.py:178 msgid "course" msgstr "matière" -#: models.py:144 models.py:430 models.py:457 +#: models.py:148 models.py:408 models.py:443 msgid "user" msgstr "utilisateur" -#: models.py:145 models.py:373 -msgid "courses" -msgstr "matières" - -#: models.py:148 models.py:386 models.py:434 +#: models.py:150 models.py:403 models.py:411 msgid "training" msgstr "formation" -#: models.py:155 models.py:175 +#: models.py:151 +msgid "courses" +msgstr "matières" + +#: models.py:159 models.py:179 msgid "professor" msgstr "professeur" -#: models.py:169 models.py:178 +#: models.py:173 models.py:182 msgid "room" msgstr "salle" -#: models.py:176 +#: models.py:180 msgid "session" msgstr "session" -#: models.py:180 +#: models.py:184 msgid "comment" msgstr "" -#: models.py:181 +#: models.py:185 msgid "begin date" msgstr "date de début" -#: models.py:182 +#: models.py:186 msgid "end date" msgstr "date de fin" -#: models.py:183 models.py:330 +#: models.py:187 models.py:349 msgid "is live" msgstr "en direct" -#: models.py:184 models.py:286 models.py:331 +#: models.py:188 models.py:305 models.py:350 msgid "readers" msgstr "" -#: models.py:204 models.py:232 models.py:282 models.py:326 +#: models.py:208 models.py:236 models.py:299 models.py:345 msgid "conference" msgstr "conférence" -#: models.py:212 +#: models.py:216 msgid "host" msgstr "" -#: models.py:213 +#: models.py:217 msgid "port" msgstr "" -#: models.py:216 +#: models.py:218 models.py:301 +#, fuzzy +msgid "type" +msgstr "type mime" + +#: models.py:220 msgid "source password" msgstr "" -#: models.py:217 +#: models.py:221 msgid "admin password" msgstr "" -#: models.py:224 models.py:234 +#: models.py:228 models.py:238 msgid "streaming_server" msgstr "" -#: models.py:235 +#: models.py:239 msgid "Streaming type" msgstr "" -#: models.py:254 +#: models.py:258 msgid "live_stream" msgstr "" -#: models.py:262 +#: models.py:266 msgid "credits" msgstr "crédits" -#: models.py:263 +#: models.py:267 msgid "published" msgstr "publié" -#: models.py:264 +#: models.py:268 msgid "date added" msgstr "date d'ajout" -#: models.py:284 +#: models.py:291 +#, fuzzy +msgid "document type" +msgstr "Aucun document" + +#: models.py:303 msgid "annal" msgstr "annale" -#: models.py:285 +#: models.py:304 msgid "file" msgstr "fichier" -#: models.py:362 models.py:363 templates/telemeta/profile_detail.html:60 +#: models.py:381 models.py:382 templates/telemeta/profile_detail.html:61 #: templates/telemeta/users.html:29 templates/telemeta/inc/user_list.html:21 msgid "IEJ" msgstr "IEJ" -#: models.py:375 +#: models.py:392 msgid "synthesis note" msgstr "note de synthèse" -#: models.py:376 +#: models.py:393 msgid "obligation" msgstr "obligation" -#: models.py:399 models.py:436 -msgid "procedure" -msgstr "procédure" +#: models.py:410 +msgid "iej" +msgstr "iej" -#: models.py:412 -msgid "speciality" -msgstr "spécialité" +#: models.py:413 +#, fuzzy +msgid "synthesis notes" +msgstr "note de synthèse" -#: models.py:425 -msgid "oral" -msgstr "" +#: models.py:416 +#, fuzzy +msgid "obligations" +msgstr "obligation" -#: models.py:432 -msgid "iej" -msgstr "iej" +#: models.py:419 +#, fuzzy +msgid "procedures" +msgstr "procédure" -#: models.py:438 -msgid "oral speciality" -msgstr "spécialité orale" +#: models.py:422 +msgid "oral specialities" +msgstr "spécialités orales" -#: models.py:440 -msgid "written speciality" -msgstr "spécialité écrit" +#: models.py:425 +msgid "written specialities" +msgstr "spécialités écrites" -#: models.py:442 models.py:444 +#: models.py:427 msgid "oral 1" msgstr "" -#: models.py:451 +#: models.py:429 +msgid "oral 2" +msgstr "" + +#: models.py:437 msgid "student" msgstr "étudiant" -#: models.py:458 templates/telemeta/profile_detail.html:71 +#: models.py:444 templates/telemeta/profile_detail.html:72 msgid "Address" msgstr "" -#: models.py:459 +#: models.py:445 msgid "Postal code" msgstr "Code postal" -#: models.py:460 +#: models.py:446 msgid "City" msgstr "Ville" -#: models.py:461 +#: models.py:447 msgid "Country" msgstr "Pays" -#: models.py:462 templates/telemeta/profile_detail.html:80 +#: models.py:448 templates/telemeta/profile_detail.html:81 msgid "Language" msgstr "Langue" -#: models.py:463 templates/telemeta/profile_detail.html:72 +#: models.py:449 templates/telemeta/profile_detail.html:73 msgid "Telephone" msgstr "Téléphone" -#: models.py:464 +#: models.py:450 msgid "Expiration_date" msgstr "Date d'expiration" -#: models.py:465 +#: models.py:451 msgid "Password initialization" msgstr "" -#: models.py:469 +#: models.py:455 msgid "profile" msgstr "profil" @@ -478,7 +489,7 @@ msgstr "" msgid "Back" msgstr "" -#: templates/postman/write.html:3 +#: templates/postman/write.html:3 templates/telemeta/inc/user_list.html:27 msgid "Write" msgstr "" @@ -505,7 +516,7 @@ msgstr "Description" #: templates/teleforma/course.html:20 templates/teleforma/course.html.py:36 #: templates/teleforma/course.html:53 templates/teleforma/course_media.html:62 -#: templates/telemeta/profile_detail.html:75 +#: templates/telemeta/profile_detail.html:76 msgid "Date added" msgstr "Date d'ajout" @@ -618,7 +629,7 @@ msgstr "Accueil" msgid "Sign in" msgstr "" -#: templates/telemeta/base.html:77 templates/telemeta/inc/user_list.html:27 +#: templates/telemeta/base.html:77 msgid "Messages" msgstr "Messages" @@ -700,7 +711,7 @@ msgstr "date de d'enregistrement" #: templates/telemeta/lists.html:74 #: templates/telemeta/search_criteria.html:149 msgid "Sound" -msgstr "" +msgstr "Sonore" #: templates/telemeta/lists.html:92 #: templates/telemeta/inc/module_revisions.html:40 @@ -739,53 +750,58 @@ msgstr "" msgid "Last Name" msgstr "" -#: templates/telemeta/profile_detail.html:61 +#: templates/telemeta/profile_detail.html:58 +#, fuzzy +msgid "Username" +msgstr "nom" + +#: templates/telemeta/profile_detail.html:62 msgid "Training" msgstr "Formation" -#: templates/telemeta/profile_detail.html:62 +#: templates/telemeta/profile_detail.html:63 #: templates/telemeta/inc/user_list.html:22 msgid "Procedure" msgstr "Procédure" -#: templates/telemeta/profile_detail.html:63 +#: templates/telemeta/profile_detail.html:64 #: templates/telemeta/inc/user_list.html:23 msgid "Oral spe" msgstr "Oral Spé" -#: templates/telemeta/profile_detail.html:64 +#: templates/telemeta/profile_detail.html:65 #: templates/telemeta/inc/user_list.html:24 msgid "Written spe" msgstr "Ecrit Spé" -#: templates/telemeta/profile_detail.html:65 +#: templates/telemeta/profile_detail.html:66 #: templates/telemeta/inc/user_list.html:25 msgid "Oral 1" msgstr "" -#: templates/telemeta/profile_detail.html:66 +#: templates/telemeta/profile_detail.html:67 #: templates/telemeta/inc/user_list.html:26 msgid "Oral 2" msgstr "" -#: templates/telemeta/profile_detail.html:70 +#: templates/telemeta/profile_detail.html:71 msgid "Email" msgstr "" -#: templates/telemeta/profile_detail.html:76 +#: templates/telemeta/profile_detail.html:77 #, fuzzy msgid "Expiration date" msgstr "Date d'expiration" -#: templates/telemeta/profile_detail.html:77 +#: templates/telemeta/profile_detail.html:78 msgid "Last login" msgstr "" -#: templates/telemeta/profile_detail.html:88 +#: templates/telemeta/profile_detail.html:89 msgid "Apply" msgstr "" -#: templates/telemeta/profile_detail.html:98 +#: templates/telemeta/profile_detail.html:99 msgid "Login as" msgstr "Se connecter en tant que" @@ -853,6 +869,21 @@ msgstr "Tweeter local" msgid "me" msgstr "moi" +#~ msgid "category" +#~ msgstr "catégorie" + +#~ msgid "categories" +#~ msgstr "catégories" + +#~ msgid "speciality" +#~ msgstr "spécialité" + +#~ msgid "oral speciality" +#~ msgstr "spécialité orale" + +#~ msgid "written speciality" +#~ msgstr "spécialité écrit" + #, fuzzy #~ msgid "Join date" #~ msgstr "date de début" @@ -885,9 +916,3 @@ msgstr "moi" #~ msgid "course types" #~ msgstr "types de matières" - -#~ msgid "oral specialities" -#~ msgstr "spécialités orales" - -#~ msgid "written specialities" -#~ msgstr "spécialités écrites" diff --git a/teleforma/models.py b/teleforma/models.py index 1bfc8ed2..b5e97d07 100755 --- a/teleforma/models.py +++ b/teleforma/models.py @@ -391,6 +391,7 @@ class Training(Model): blank=True, null=True) synthesis_note = BooleanField(_('synthesis note')) obligation = BooleanField(_('obligation')) + cost = FloatField(_('cost (€)')) def __unicode__(self): code = self.code @@ -430,11 +431,15 @@ class Student(Model): blank=True, null=True) def __unicode__(self): - return self.user.username + try: + return self.user.last_name + ' ' + self.user.first_name + except: + return '' class Meta: db_table = app_label + '_' + 'student' verbose_name = _('student') + ordering = ['user'] class Profile(models.Model): @@ -455,6 +460,18 @@ class Profile(models.Model): verbose_name = _('profile') +class Payment(models.Model): + "Student payment" + + student = ForeignKey(Student, related_name="payment", verbose_name=_('student')) + amount = FloatField(_('amount (€)')) + date_added = DateTimeField(_('date added'), auto_now_add=True) + + class Meta: + db_table = app_label + '_' + 'payment' + verbose_name = _('payment') + + # TOOLS class NamePaginator(object): """Pagination for string-based objects""" diff --git a/teleforma/views.py b/teleforma/views.py index d8ed1f5d..3cb292b1 100755 --- a/teleforma/views.py +++ b/teleforma/views.py @@ -297,6 +297,7 @@ class UsersCourseView(UsersView): def dispatch(self, *args, **kwargs): return super(UsersCourseView, self).dispatch(*args, **kwargs) + class UsersXLSExport(object): first_row = 2 -- 2.39.5