.
This commit is contained in:
+1
-2
@@ -61,12 +61,11 @@ class LongCreationDefaultForm(ModelForm):
|
|||||||
class LongSeriesForm(ModelForm):
|
class LongSeriesForm(ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(LongSeriesForm, self).__init__(*args, **kwargs)
|
super(LongSeriesForm, self).__init__(*args, **kwargs)
|
||||||
self.fields["examination"] = ModelMultipleChoiceField(
|
self.fields["examination"] = ModelChoiceField(
|
||||||
queryset=Examination.objects.all(),
|
queryset=Examination.objects.all(),
|
||||||
widget=FilteredSelectMultiple(verbose_name="Examination", is_stacked=False),
|
widget=FilteredSelectMultiple(verbose_name="Examination", is_stacked=False),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = LongSeries
|
model = LongSeries
|
||||||
exclude = []
|
exclude = []
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 3.1.3 on 2021-02-05 11:46
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('longs', '0008_auto_20210205_1013'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='longseries',
|
||||||
|
name='description',
|
||||||
|
field=models.TextField(blank=True, help_text='Description of stack, for admin organisation, will not be visible when taking'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='longseries',
|
||||||
|
name='long',
|
||||||
|
field=models.ForeignKey(help_text='The question this series should be associated with', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='series', to='longs.long'),
|
||||||
|
),
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user