notes on Participation instead of Profile
This commit is contained in:
parent
86c2a42e58
commit
78c0156253
|
@ -15,11 +15,11 @@ ParticipationForm = modelform_factory(Participation, fields=['transport', 'conne
|
|||
widgets={'transport': forms.CheckboxSelectMultiple(),
|
||||
'connector': forms.CheckboxSelectMultiple()})
|
||||
|
||||
ProfileOrgaForm = modelform_factory(Profile, fields=['biography', 'notes'])
|
||||
ProfileOrgaForm = modelform_factory(Profile, fields=['biography'])
|
||||
|
||||
ParticipationOrgaForm = modelform_factory(Participation,
|
||||
fields=['transport', 'connector', 'sound', 'videotaped', 'video_licence',
|
||||
'constraints', 'orga'],
|
||||
'constraints', 'notes', 'orga'],
|
||||
widgets={'transport': forms.CheckboxSelectMultiple(),
|
||||
'connector': forms.CheckboxSelectMultiple()})
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.7 on 2016-07-12 12:04
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0004_auto_20160710_2011'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='profile',
|
||||
name='notes',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='participation',
|
||||
name='notes',
|
||||
field=models.TextField(blank=True, default=''),
|
||||
),
|
||||
]
|
|
@ -15,7 +15,6 @@ class Profile(PonyConfModel):
|
|||
user = models.OneToOneField(User)
|
||||
biography = models.TextField(blank=True, verbose_name='Biography')
|
||||
email_token = models.CharField(max_length=12, default=generate_user_uid, unique=True)
|
||||
notes = models.TextField(default='')
|
||||
|
||||
def __str__(self):
|
||||
return self.user.get_full_name() or self.user.username
|
||||
|
@ -57,6 +56,7 @@ class Participation(PonyConfModel):
|
|||
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)
|
||||
notes = models.TextField(default='', blank=True)
|
||||
orga = models.BooleanField(default=False)
|
||||
|
||||
class Meta:
|
||||
|
|
|
@ -49,7 +49,7 @@ class AccountTests(TestCase):
|
|||
self.client.login(username='b', password='b')
|
||||
self.assertEqual(self.client.get(reverse('list-participant')).status_code, 403)
|
||||
self.assertEqual(self.client.post(reverse('edit-participant', kwargs={'username': 'a'}),
|
||||
{'biography': 'foo', 'notes': 'bar'}).status_code, 403)
|
||||
{'biography': 'foo'}).status_code, 403)
|
||||
b = User.objects.get(username='b')
|
||||
b.is_superuser = True
|
||||
b.save()
|
||||
|
|
Loading…
Reference in New Issue