Merge branch 'data_migrations' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into data_migrations
This commit is contained in:
commit
06ee2953da
3 changed files with 4 additions and 2 deletions
|
@ -257,6 +257,7 @@ class NahrajReseniForm(forms.ModelForm):
|
|||
class Meta:
|
||||
model = m.Reseni
|
||||
fields = ('problem',)
|
||||
help_texts = {'problem':''} # Nezobrazovat help text ve formuláři
|
||||
|
||||
widgets = {'problem':
|
||||
autocomplete.ModelSelect2Multiple(
|
||||
|
@ -272,6 +273,7 @@ ReseniSPrilohamiFormSet = inlineformset_factory(m.Reseni,m.PrilohaReseni,
|
|||
fields = ('soubor','res_poznamka'),
|
||||
widgets = {'res_poznamka':forms.TextInput()},
|
||||
extra = 1,
|
||||
can_delete = False,
|
||||
|
||||
)
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ urlpatterns = [
|
|||
path('autocomplete/problem/odevzdatelny',views.OdevzdatelnyProblemAutocomplete.as_view(), name='autocomplete_problem_odevzdatelny'),
|
||||
|
||||
path('temp/add_solution', views.AddSolutionView.as_view(),name='seminar_vloz_reseni'),
|
||||
path('temp/submit_solution', views.SubmitSolutionView.as_view(),name='seminar_nahraj_reseni'),
|
||||
path('temp/nahraj_reseni', views.NahrajReseniView.as_view(),name='seminar_nahraj_reseni'),
|
||||
|
||||
path('', views.TitulniStranaView.as_view(), name='titulni_strana'),
|
||||
|
||||
|
|
|
@ -1230,7 +1230,7 @@ class AddSolutionView(LoginRequiredMixin, FormView):
|
|||
form_class = f.VlozReseniForm
|
||||
success_url = '/'
|
||||
|
||||
class SubmitSolutionView(LoginRequiredMixin, CreateView):
|
||||
class NahrajReseniView(LoginRequiredMixin, CreateView):
|
||||
model = s.Reseni
|
||||
template_name = 'seminar/nahraj_reseni.html'
|
||||
form_class = f.NahrajReseniForm
|
||||
|
|
Loading…
Reference in a new issue