From 058a771695e96e77894ef432022346455d7fe8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Sun, 13 Nov 2016 20:09:50 +0100 Subject: [PATCH] profile: add phone number field --- accounts/forms.py | 2 +- .../migrations/0016_profile_phone_number.py | 20 +++++++ accounts/models.py | 1 + locale/fr/LC_MESSAGES/django.mo | Bin 15055 -> 15108 bytes locale/fr/LC_MESSAGES/django.po | 50 ++++++++++-------- .../migrations/0004_auto_20161113_1908.py | 19 +++++++ 6 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 accounts/migrations/0016_profile_phone_number.py create mode 100644 volunteers/migrations/0004_auto_20161113_1908.py diff --git a/accounts/forms.py b/accounts/forms.py index d33ddbc..c62d6bb 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -9,7 +9,7 @@ from .models import Participation, Profile UserForm = modelform_factory(User, fields=['first_name', 'last_name', 'email', 'username']) -ProfileForm = modelform_factory(Profile, fields=['biography']) +ProfileForm = modelform_factory(Profile, fields=['phone_number', 'biography']) ParticipationForm = modelform_factory(Participation, fields=['need_transport', 'transport', 'transport_city_outward', 'transport_city_return', diff --git a/accounts/migrations/0016_profile_phone_number.py b/accounts/migrations/0016_profile_phone_number.py new file mode 100644 index 0000000..463a400 --- /dev/null +++ b/accounts/migrations/0016_profile_phone_number.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2016-11-13 19:08 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0015_auto_20161013_1922'), + ] + + operations = [ + migrations.AddField( + model_name='profile', + name='phone_number', + field=models.CharField(blank=True, default='', max_length=16, verbose_name='Phone number'), + ), + ] diff --git a/accounts/models.py b/accounts/models.py index 376b5f7..9745ca3 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -15,6 +15,7 @@ from .utils import generate_user_uid class Profile(PonyConfModel): user = models.OneToOneField(User) + phone_number = models.CharField(max_length=16, blank=True, default='', verbose_name=_('Phone number')) biography = models.TextField(blank=True, verbose_name=_('Biography')) email_token = models.CharField(max_length=12, default=generate_user_uid, unique=True) diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index 8a1329c2ac1afa563b0b5e5300ccd8b0d7f0e1b6..cba5ee38c79f8f87b427d5c6b298acd2be2142b5 100644 GIT binary patch delta 4661 zcmXxn4OCb49mnzCA5c&b_=5_F#NP+h5)^zEa`WkoG~EeWsB^I7Y2pJU3lc%EI;@q< zrT;lJS7e(@G#y4}inuvSVQW5SEljqWCv&IMc1+uJWqW`A_t!ms|F7Tgcklf@eDCjG zj%TattDT;hknM(}hZsymgc>v6W6YQR)M`v;j4}6M7Y@NsZ~*p=H6{~%7>0{60*jG< zW|eK+VNQG#g2lc^HS` zVvIxw11mk8v)>#xYslSU^EHR9b6LGhT0f8a41X)BugPeK#sI`%urm z4K?9TTkl5oe+_;3Kh$0t9Pie%;*Db_(eMKr)}tS_^8Vy68GWctIUUt;KI++5pa!n8 z^(Rq}paC`U7Nje46!l0i*!I7p7H}Q)C_hgi|4R8?dm?g>yV7{n07a)^{5VC zLZ$i;Dz%qT6aNRQpHGqfWkR?~6G}u4JQ8*N1XM<6y5}8}XD=v3rKSQk!x~h_4r)a| zMQy?zsEIs}L-7^V3eTcGP}flt31_FJ;xJS{525;9gxc&s49N2@rNBLAB@V~Us0_3q zSu$<5{+_LWgzD%neg{L?sbld$oQt(M22bI=cnkF!Ci~p`a!?akpt?h$z%~?Hm+J)W zmA1YbwTT>5>b9aLxCgb#T2SXtqB3w1)qV@L^4>Hm^--wICE0o^I=V5Ff>J*Z)o~sw z)k{#REw!%4OzO{}I=+P3?LDYW+{6i(#dA?69z$K zWH9QJI|kK01GNcfqc+n#RAv@h3s9S_7}a4d>iT+nz5z#2--e8Bj-nR!0qVXFhmn7+ z{J-`@5F0=ph2k;~GekYZ+7$PLvW|S- z)C4ADC^|DK=*GFI)aRi(C_}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L+vH>23$W5c?EZ5bYj4HcS>}8 z=1*z)IiYR$AW=(H5M6|J0Pm>TN$ACW(p?c98_?@+j84A)dFn3`k;FdY9%2ch-Kk?a zp)I_b(7QB=(D5UW{@>M7TmCUlCEg{r6MI~rFDdRgCA}PD2puPgU%N%V_~9oh6%lU` zZxS1c6@)&MtKE8EazqQIWIdD6zF6lqO79cDB=U$h;vJ%z z$RW-UmBdSgj-!M=Vmek4>j-@Wd6WB(hxoh3mP2r?Eg#085PsrqVmQH3VmkTz{r4+yEQ ztzTSO=entBf%P>zT2q4pDq7k`zZ;rZ)KFDhW9C-YS1npp`Gmiswyv&fVP&0vk-I\n" "Language-Team: LANGUAGE \n" @@ -26,74 +26,78 @@ msgstr "" "viande, etc." #: accounts/models.py:18 +msgid "Phone number" +msgstr "Numéro de téléphone" + +#: accounts/models.py:19 #: accounts/templates/accounts/participant_details.html:20 msgid "Biography" msgstr "Biographie" -#: accounts/models.py:53 +#: accounts/models.py:54 msgid "No" msgstr "Non" -#: accounts/models.py:54 +#: accounts/models.py:55 msgid "Hotel" msgstr "" -#: accounts/models.py:55 +#: accounts/models.py:56 msgid "Homestay" msgstr "Logement chez habitant" -#: accounts/models.py:62 +#: accounts/models.py:63 msgid "Defray transportation?" msgstr "Défraiement du transport ?" -#: accounts/models.py:65 +#: accounts/models.py:66 msgid "I want to travel by" msgstr "Je souhaite voyager en" -#: accounts/models.py:66 +#: accounts/models.py:67 msgid "Departure city" msgstr "Ville de départ" -#: accounts/models.py:67 +#: accounts/models.py:68 msgid "Return city" msgstr "Ville de retour" -#: accounts/models.py:67 +#: accounts/models.py:68 msgid "If different from departure city" msgstr "Si différent de la ville de départ" -#: accounts/models.py:70 +#: accounts/models.py:71 msgid "Need accommodation?" msgstr "Besoin d'un hébergement ?" -#: accounts/models.py:73 +#: accounts/models.py:74 #: accounts/templates/accounts/participant_details.html:68 msgid "Constraints" msgstr "Contraintes" -#: accounts/models.py:74 +#: accounts/models.py:75 msgid "I can output" msgstr "Sortie vidéo" -#: accounts/models.py:75 +#: accounts/models.py:76 msgid "I need sound" msgstr "J’ai besoin de son" -#: accounts/models.py:77 +#: accounts/models.py:78 msgid "I'm ok to be recorded on video" msgstr "J’accepte d’être enregistré en vidéo" -#: accounts/models.py:78 +#: accounts/models.py:79 msgid "Video licence" msgstr "Licence vidéo" -#: accounts/models.py:80 +#: accounts/models.py:81 #: accounts/templates/accounts/participant_details.html:71 #: proposals/models.py:156 proposals/templates/proposals/talk_detail.html:94 msgid "Notes" msgstr "Notes" -#: accounts/models.py:80 +#: accounts/models.py:81 msgid "This field is only visible by organizers." msgstr "Ce champs est uniquement visible par les organisateurs." @@ -327,21 +331,21 @@ msgstr "Changer de mot de passe" #: accounts/views.py:36 accounts/views.py:65 msgid "Profile updated successfully." -msgstr "Profil mis à jour avec succès !" +msgstr "Profil modifié avec succès !" #: accounts/views.py:38 accounts/views.py:67 msgid "Please correct those errors." -msgstr "Veuillez corriger les erreurs." +msgstr "Merci de corriger ces erreurs." #: accounts/views.py:83 #, python-format msgid "%(name)s added to participants" -msgstr "%(name)s ajouter aux participants" +msgstr "%(name)s a été ajouté aux participants" #: accounts/views.py:85 #, python-format msgid "%(name)s is already a participant" -msgstr "%(name)s est déjà un participant" +msgstr "%(name)s est déjà participant" #: conversations/templates/conversations/_message_form.html:4 msgid "Send a message" @@ -492,7 +496,7 @@ msgstr "Bénévoles" #: ponyconf/templates/staff.html:18 msgid "Conference" -msgstr "conférence" +msgstr "Conférence" #: proposals/forms.py:45 msgid "Should be less than 255 characters" @@ -918,7 +922,7 @@ msgstr "Se désinscrire" msgid "" "There are no workshops requiring registration for now … come back later!" msgstr "" -"Il n’y a pas d’atelier nécessitante de s’inscrire pour le moment … mais " +"Il n’y a pas d’atelier nécessitant de s’inscrire pour le moment … mais " "revenez plus tard !" #: proposals/templates/proposals/topic_form.html:14 diff --git a/volunteers/migrations/0004_auto_20161113_1908.py b/volunteers/migrations/0004_auto_20161113_1908.py new file mode 100644 index 0000000..f822e32 --- /dev/null +++ b/volunteers/migrations/0004_auto_20161113_1908.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2016-11-13 19:08 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('volunteers', '0003_auto_20161024_1313'), + ] + + operations = [ + migrations.AlterModelOptions( + name='activity', + options={'verbose_name': 'Activity', 'verbose_name_plural': 'Activities'}, + ), + ]