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'])
|
ProfileForm = modelform_factory(Profile, fields=['biography'])
|
||||||
|
|
||||||
ParticipationForm = modelform_factory(Participation, fields=['transport', 'connector', 'sound', 'videotaped',
|
ParticipationForm = modelform_factory(Participation,
|
||||||
'video_licence', 'constraints'],
|
fields=['need_transport', 'transport',
|
||||||
|
'need_hosting', 'homestay',
|
||||||
|
'connector', 'sound', 'videotaped',
|
||||||
|
'video_licence', 'constraints'],
|
||||||
widgets={'transport': forms.CheckboxSelectMultiple(),
|
widgets={'transport': forms.CheckboxSelectMultiple(),
|
||||||
'connector': forms.CheckboxSelectMultiple()},
|
'connector': forms.CheckboxSelectMultiple()},
|
||||||
help_texts = {
|
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'])
|
ProfileOrgaForm = modelform_factory(Profile, fields=['biography'])
|
||||||
|
|
30
accounts/migrations/0008_auto_20160808_2251.py
Normal file
30
accounts/migrations/0008_auto_20160808_2251.py
Normal file
|
@ -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)
|
site = models.ForeignKey(Site, on_delete=models.CASCADE)
|
||||||
user = models.ForeignKey(User)
|
user = models.ForeignKey(User)
|
||||||
|
|
||||||
|
|
||||||
|
need_transport = models.BooleanField(verbose_name=_('Need transport?'), default=False)
|
||||||
arrival = models.DateTimeField(blank=True, null=True)
|
arrival = models.DateTimeField(blank=True, null=True)
|
||||||
departure = 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)
|
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"))
|
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)
|
sound = models.BooleanField(_("I need sound"), default=False)
|
||||||
|
|
||||||
videotaped = models.BooleanField(_("I'm ok to be recorded on video"), default=True)
|
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"))
|
video_licence = models.IntegerField(choices=enum_to_choices(LICENCES), default=1, verbose_name=_("Video licence"))
|
||||||
|
|
||||||
notes = models.TextField(default='', blank=True, verbose_name=_("Notes"))
|
notes = models.TextField(default='', blank=True, verbose_name=_("Notes"))
|
||||||
orga = models.BooleanField(default=False)
|
orga = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -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-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"
|
"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"
|
||||||
|
@ -18,7 +18,7 @@ msgstr ""
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
|
||||||
#: accounts/forms.py:19
|
#: accounts/forms.py:22
|
||||||
msgid ""
|
msgid ""
|
||||||
"For example, you need to be back on saturday evening, you cannot eat meat."
|
"For example, you need to be back on saturday evening, you cannot eat meat."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -29,31 +29,43 @@ msgstr ""
|
||||||
msgid "Biography"
|
msgid "Biography"
|
||||||
msgstr "Biographie"
|
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"
|
msgid "I'm ok to travel by"
|
||||||
msgstr "J’accepte de voyager en"
|
msgstr "J’accepte de voyager en"
|
||||||
|
|
||||||
#: accounts/models.py:55
|
#: accounts/models.py:58
|
||||||
msgid "I can output"
|
msgid "Need hosting?"
|
||||||
msgstr "Sortie vidéo"
|
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"
|
msgid "Constraints"
|
||||||
msgstr "Contraintes"
|
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"
|
msgid "I need sound"
|
||||||
msgstr "J’ai besoin de son"
|
msgstr "J’ai besoin de son"
|
||||||
|
|
||||||
#: accounts/models.py:58
|
#: accounts/models.py:65
|
||||||
msgid "I'm ok to be recorded on video"
|
msgid "I'm ok to be recorded on video"
|
||||||
msgstr "J’accepte d’être enregistré en vidéo"
|
msgstr "J’accepte d’être enregistré en vidéo"
|
||||||
|
|
||||||
#: accounts/models.py:59
|
#: accounts/models.py:66
|
||||||
msgid "Video licence"
|
msgid "Video licence"
|
||||||
msgstr "Licence vidéo"
|
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
|
#: proposals/templates/proposals/user_details.html:19
|
||||||
msgid "Notes"
|
msgid "Notes"
|
||||||
msgstr "Notes"
|
msgstr "Notes"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user