mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-05 01:26:54 +00:00
A user can have no team
This commit is contained in:
parent
eec941c816
commit
95a69f35d2
@ -50,7 +50,7 @@ class Migration(migrations.Migration):
|
|||||||
('student_class', models.IntegerField(choices=[(12, '12th grade'), (11, '11th grade'), (10, '10th grade or lower')], verbose_name='student class')),
|
('student_class', models.IntegerField(choices=[(12, '12th grade'), (11, '11th grade'), (10, '10th grade or lower')], verbose_name='student class')),
|
||||||
('school', models.CharField(max_length=255, verbose_name='school')),
|
('school', models.CharField(max_length=255, verbose_name='school')),
|
||||||
('photo_authorization', models.FileField(blank=True, default='', upload_to=registration.models.get_random_filename, verbose_name='photo authorization')),
|
('photo_authorization', models.FileField(blank=True, default='', upload_to=registration.models.get_random_filename, verbose_name='photo authorization')),
|
||||||
('team', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='students', to='participation.team', verbose_name='team')),
|
('team', models.ForeignKey(default=None, blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='students', to='participation.team', verbose_name='team')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'student registration',
|
'verbose_name': 'student registration',
|
||||||
@ -63,7 +63,7 @@ class Migration(migrations.Migration):
|
|||||||
fields=[
|
fields=[
|
||||||
('registration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.registration')),
|
('registration_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='registration.registration')),
|
||||||
('professional_activity', models.TextField(verbose_name='professional activity')),
|
('professional_activity', models.TextField(verbose_name='professional activity')),
|
||||||
('team', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='coachs', to='participation.team', verbose_name='team')),
|
('team', models.ForeignKey(default=None, blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='coachs', to='participation.team', verbose_name='team')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'coach registration',
|
'verbose_name': 'coach registration',
|
||||||
|
@ -105,6 +105,7 @@ class StudentRegistration(Registration):
|
|||||||
related_name="students",
|
related_name="students",
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
null=True,
|
null=True,
|
||||||
|
blank=True,
|
||||||
default=None,
|
default=None,
|
||||||
verbose_name=_("team"),
|
verbose_name=_("team"),
|
||||||
)
|
)
|
||||||
@ -154,6 +155,7 @@ class CoachRegistration(Registration):
|
|||||||
related_name="coachs",
|
related_name="coachs",
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
null=True,
|
null=True,
|
||||||
|
blank=True,
|
||||||
default=None,
|
default=None,
|
||||||
verbose_name=_("team"),
|
verbose_name=_("team"),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user