profile: add phone number field

This commit is contained in:
Élie Bouttier 2016-11-13 20:09:50 +01:00
parent b77e8467d6
commit 058a771695
6 changed files with 68 additions and 24 deletions

View File

@ -9,7 +9,7 @@ from .models import Participation, Profile
UserForm = modelform_factory(User, fields=['first_name', 'last_name', 'email', 'username']) 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, ParticipationForm = modelform_factory(Participation,
fields=['need_transport', 'transport', 'transport_city_outward', 'transport_city_return', fields=['need_transport', 'transport', 'transport_city_outward', 'transport_city_return',

View File

@ -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'),
),
]

View File

@ -15,6 +15,7 @@ from .utils import generate_user_uid
class Profile(PonyConfModel): class Profile(PonyConfModel):
user = models.OneToOneField(User) 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')) biography = models.TextField(blank=True, verbose_name=_('Biography'))
email_token = models.CharField(max_length=12, default=generate_user_uid, unique=True) email_token = models.CharField(max_length=12, default=generate_user_uid, unique=True)

Binary file not shown.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-13 23:26+0000\n" "POT-Creation-Date: 2016-11-14 22:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -26,74 +26,78 @@ msgstr ""
"viande, etc." "viande, etc."
#: accounts/models.py:18 #: 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 #: accounts/templates/accounts/participant_details.html:20
msgid "Biography" msgid "Biography"
msgstr "Biographie" msgstr "Biographie"
#: accounts/models.py:53 #: accounts/models.py:54
msgid "No" msgid "No"
msgstr "Non" msgstr "Non"
#: accounts/models.py:54 #: accounts/models.py:55
msgid "Hotel" msgid "Hotel"
msgstr "" msgstr ""
#: accounts/models.py:55 #: accounts/models.py:56
msgid "Homestay" msgid "Homestay"
msgstr "Logement chez habitant" msgstr "Logement chez habitant"
#: accounts/models.py:62 #: accounts/models.py:63
msgid "Defray transportation?" msgid "Defray transportation?"
msgstr "Défraiement du transport ?" msgstr "Défraiement du transport ?"
#: accounts/models.py:65 #: accounts/models.py:66
msgid "I want to travel by" msgid "I want to travel by"
msgstr "Je souhaite voyager en" msgstr "Je souhaite voyager en"
#: accounts/models.py:66 #: accounts/models.py:67
msgid "Departure city" msgid "Departure city"
msgstr "Ville de départ" msgstr "Ville de départ"
#: accounts/models.py:67 #: accounts/models.py:68
msgid "Return city" msgid "Return city"
msgstr "Ville de retour" msgstr "Ville de retour"
#: accounts/models.py:67 #: accounts/models.py:68
msgid "If different from departure city" msgid "If different from departure city"
msgstr "Si différent de la ville de départ" msgstr "Si différent de la ville de départ"
#: accounts/models.py:70 #: accounts/models.py:71
msgid "Need accommodation?" msgid "Need accommodation?"
msgstr "Besoin d'un hébergement ?" msgstr "Besoin d'un hébergement ?"
#: accounts/models.py:73 #: accounts/models.py:74
#: accounts/templates/accounts/participant_details.html:68 #: accounts/templates/accounts/participant_details.html:68
msgid "Constraints" msgid "Constraints"
msgstr "Contraintes" msgstr "Contraintes"
#: accounts/models.py:74 #: accounts/models.py:75
msgid "I can output" msgid "I can output"
msgstr "Sortie vidéo" msgstr "Sortie vidéo"
#: accounts/models.py:75 #: accounts/models.py:76
msgid "I need sound" msgid "I need sound"
msgstr "Jai besoin de son" msgstr "Jai besoin de son"
#: accounts/models.py:77 #: accounts/models.py:78
msgid "I'm ok to be recorded on video" msgid "I'm ok to be recorded on video"
msgstr "Jaccepte dêtre enregistré en vidéo" msgstr "Jaccepte dêtre enregistré en vidéo"
#: accounts/models.py:78 #: accounts/models.py:79
msgid "Video licence" msgid "Video licence"
msgstr "Licence vidéo" msgstr "Licence vidéo"
#: accounts/models.py:80 #: accounts/models.py:81
#: accounts/templates/accounts/participant_details.html:71 #: accounts/templates/accounts/participant_details.html:71
#: proposals/models.py:156 proposals/templates/proposals/talk_detail.html:94 #: proposals/models.py:156 proposals/templates/proposals/talk_detail.html:94
msgid "Notes" msgid "Notes"
msgstr "Notes" msgstr "Notes"
#: accounts/models.py:80 #: accounts/models.py:81
msgid "This field is only visible by organizers." msgid "This field is only visible by organizers."
msgstr "Ce champs est uniquement visible par les organisateurs." 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 #: accounts/views.py:36 accounts/views.py:65
msgid "Profile updated successfully." 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 #: accounts/views.py:38 accounts/views.py:67
msgid "Please correct those errors." msgid "Please correct those errors."
msgstr "Veuillez corriger les erreurs." msgstr "Merci de corriger ces erreurs."
#: accounts/views.py:83 #: accounts/views.py:83
#, python-format #, python-format
msgid "%(name)s added to participants" msgid "%(name)s added to participants"
msgstr "%(name)s ajouter aux participants" msgstr "%(name)s a été ajouté aux participants"
#: accounts/views.py:85 #: accounts/views.py:85
#, python-format #, python-format
msgid "%(name)s is already a participant" 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 #: conversations/templates/conversations/_message_form.html:4
msgid "Send a message" msgid "Send a message"
@ -492,7 +496,7 @@ msgstr "Bénévoles"
#: ponyconf/templates/staff.html:18 #: ponyconf/templates/staff.html:18
msgid "Conference" msgid "Conference"
msgstr "conférence" msgstr "Conférence"
#: proposals/forms.py:45 #: proposals/forms.py:45
msgid "Should be less than 255 characters" msgid "Should be less than 255 characters"
@ -918,7 +922,7 @@ msgstr "Se désinscrire"
msgid "" msgid ""
"There are no workshops requiring registration for now … come back later!" "There are no workshops requiring registration for now … come back later!"
msgstr "" msgstr ""
"Il ny a pas datelier nécessitante de sinscrire pour le moment … mais " "Il ny a pas datelier nécessitant de sinscrire pour le moment … mais "
"revenez plus tard !" "revenez plus tard !"
#: proposals/templates/proposals/topic_form.html:14 #: proposals/templates/proposals/topic_form.html:14

View File

@ -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'},
),
]