From e74afdd55001ebf3aef9d7e58a2e9d6aac5792e4 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sat, 25 Jun 2016 12:41:08 +0200 Subject: [PATCH] speaker needs sound --- accounts/forms.py | 2 +- .../migrations/0005_participation_sound.py | 20 +++++++++++++++++++ accounts/models.py | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 accounts/migrations/0005_participation_sound.py diff --git a/accounts/forms.py b/accounts/forms.py index 878e6bf..1b1876f 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -8,6 +8,6 @@ __all__ = ['UserForm', 'ProfileForm'] UserForm = modelform_factory(User, fields=['first_name', 'last_name', 'email', 'username']) -ParticipationForm = modelform_factory(Participation, fields=['transport', 'connector', 'constraints']) +ParticipationForm = modelform_factory(Participation, fields=['transport', 'connector', 'sound', 'constraints']) ProfileForm = modelform_factory(Profile, fields=['biography']) diff --git a/accounts/migrations/0005_participation_sound.py b/accounts/migrations/0005_participation_sound.py new file mode 100644 index 0000000..9e0bc61 --- /dev/null +++ b/accounts/migrations/0005_participation_sound.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-06-25 10:38 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0004_remove_participation_review_topics'), + ] + + operations = [ + migrations.AddField( + model_name='participation', + name='sound', + field=models.BooleanField(default=False, verbose_name='I need sound'), + ), + ] diff --git a/accounts/models.py b/accounts/models.py index 6cbf174..2a1802d 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -40,6 +40,7 @@ class Participation(models.Model): transport = models.IntegerField(choices=enum_to_choices(TRANSPORTS), blank=True, null=True) connector = models.IntegerField(choices=enum_to_choices(CONNECTORS), blank=True, null=True) constraints = models.TextField(blank=True) + sound = models.BooleanField("I need sound", default=False) objects = models.Manager() on_site = CurrentSiteManager()