Add hosting fields to account.
This commit is contained in:
parent
118869842c
commit
c687a12902
|
@ -11,12 +11,15 @@ UserForm = modelform_factory(User, fields=['first_name', 'last_name', 'email', '
|
|||
|
||||
ProfileForm = modelform_factory(Profile, fields=['biography'])
|
||||
|
||||
ParticipationForm = modelform_factory(Participation, fields=['transport', 'connector', 'sound', 'videotaped',
|
||||
'video_licence', 'constraints'],
|
||||
ParticipationForm = modelform_factory(Participation,
|
||||
fields=['need_transport', 'transport',
|
||||
'need_hosting', 'homestay',
|
||||
'connector', 'sound', 'videotaped',
|
||||
'video_licence', 'constraints'],
|
||||
widgets={'transport': forms.CheckboxSelectMultiple(),
|
||||
'connector': forms.CheckboxSelectMultiple()},
|
||||
help_texts = {
|
||||
'constraints': _('For example, you need to be back on saturday evening, you cannot eat meat.'),
|
||||
'constraints': _('For example, you need to be back on saturday evening, you cannot eat meat.'),
|
||||
})
|
||||
|
||||
ProfileOrgaForm = modelform_factory(Profile, fields=['biography'])
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10 on 2016-08-08 22:51
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0007_auto_20160808_2145'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='participation',
|
||||
name='homestay',
|
||||
field=models.BooleanField(default=False, verbose_name='Ok for homestay?'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='participation',
|
||||
name='need_hosting',
|
||||
field=models.BooleanField(default=False, verbose_name='Need hosting?'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='participation',
|
||||
name='need_transport',
|
||||
field=models.BooleanField(default=False, verbose_name='Need transport?'),
|
||||
),
|
||||
]
|
|
@ -49,14 +49,22 @@ class Participation(PonyConfModel):
|
|||
site = models.ForeignKey(Site, on_delete=models.CASCADE)
|
||||
user = models.ForeignKey(User)
|
||||
|
||||
|
||||
need_transport = models.BooleanField(verbose_name=_('Need transport?'), default=False)
|
||||
arrival = models.DateTimeField(blank=True, null=True)
|
||||
departure = models.DateTimeField(blank=True, null=True)
|
||||
transport = models.ManyToManyField(Transport, verbose_name=_("I'm ok to travel by"), blank=True)
|
||||
connector = models.ManyToManyField(Connector, verbose_name=_("I can output"), blank=True)
|
||||
|
||||
need_hosting = models.BooleanField(verbose_name=_('Need hosting?'), default=False)
|
||||
homestay = models.BooleanField(verbose_name=_('Ok for homestay?'), default=False)
|
||||
|
||||
constraints = models.TextField(blank=True, verbose_name=_("Constraints"))
|
||||
connector = models.ManyToManyField(Connector, verbose_name=_("I can output"), blank=True)
|
||||
sound = models.BooleanField(_("I need sound"), default=False)
|
||||
|
||||
videotaped = models.BooleanField(_("I'm ok to be recorded on video"), default=True)
|
||||
video_licence = models.IntegerField(choices=enum_to_choices(LICENCES), default=1, verbose_name=_("Video licence"))
|
||||
|
||||
notes = models.TextField(default='', blank=True, verbose_name=_("Notes"))
|
||||
orga = models.BooleanField(default=False)
|
||||
|
||||
|
|
Binary file not shown.
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-08-08 22:21+0000\n"
|
||||
"POT-Creation-Date: 2016-08-08 22:52+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"
|
||||
|
@ -18,7 +18,7 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: accounts/forms.py:19
|
||||
#: accounts/forms.py:22
|
||||
msgid ""
|
||||
"For example, you need to be back on saturday evening, you cannot eat meat."
|
||||
msgstr ""
|
||||
|
@ -29,31 +29,43 @@ msgstr ""
|
|||
msgid "Biography"
|
||||
msgstr "Biographie"
|
||||
|
||||
#: accounts/models.py:54
|
||||
#: accounts/models.py:53
|
||||
msgid "Need transport?"
|
||||
msgstr "Besoin de défraiment pour le transport ?"
|
||||
|
||||
#: accounts/models.py:56
|
||||
msgid "I'm ok to travel by"
|
||||
msgstr "J’accepte de voyager en"
|
||||
|
||||
#: accounts/models.py:55
|
||||
msgid "I can output"
|
||||
msgstr "Sortie vidéo"
|
||||
#: accounts/models.py:58
|
||||
msgid "Need hosting?"
|
||||
msgstr "Besoin d'un hébergement ?"
|
||||
|
||||
#: accounts/models.py:56
|
||||
#: accounts/models.py:59
|
||||
msgid "Ok for homestay?"
|
||||
msgstr "Ok pour un logement chez l'habitant ?"
|
||||
|
||||
#: accounts/models.py:61
|
||||
msgid "Constraints"
|
||||
msgstr "Contraintes"
|
||||
|
||||
#: accounts/models.py:57
|
||||
#: accounts/models.py:62
|
||||
msgid "I can output"
|
||||
msgstr "Sortie vidéo"
|
||||
|
||||
#: accounts/models.py:63
|
||||
msgid "I need sound"
|
||||
msgstr "J’ai besoin de son"
|
||||
|
||||
#: accounts/models.py:58
|
||||
#: accounts/models.py:65
|
||||
msgid "I'm ok to be recorded on video"
|
||||
msgstr "J’accepte d’être enregistré en vidéo"
|
||||
|
||||
#: accounts/models.py:59
|
||||
#: accounts/models.py:66
|
||||
msgid "Video licence"
|
||||
msgstr "Licence vidéo"
|
||||
|
||||
#: accounts/models.py:60 proposals/models.py:60
|
||||
#: accounts/models.py:68 proposals/models.py:60
|
||||
#: proposals/templates/proposals/user_details.html:19
|
||||
msgid "Notes"
|
||||
msgstr "Notes"
|
||||
|
|
Loading…
Reference in New Issue