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

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):
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)

Binary file not shown.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 "Jai besoin de son"
#: accounts/models.py:77
#: accounts/models.py:78
msgid "I'm ok to be recorded on video"
msgstr "Jaccepte 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 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 !"
#: 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'},
),
]