Compare commits
No commits in common. "92cb8ec206d6a353d113a4856b2718240de08b34" and "192ae6912ff5c2d750bff92a7cadb1747d14e5f7" have entirely different histories.
92cb8ec206
...
192ae6912f
2 changed files with 7 additions and 6 deletions
|
@ -53,6 +53,12 @@ class PosliReseniForm(forms.Form):
|
|||
#poznamka = models.TextField('neveřejná poznámka', blank=True,
|
||||
# help_text='Neveřejná poznámka k řešení (plain text)')
|
||||
|
||||
#TODO body do cisla
|
||||
#TODO prilohy
|
||||
|
||||
##def __init__(self, *args, **kwargs):
|
||||
## super().__init__(*args, **kwargs)
|
||||
## #self.fields['favorite_color'] = forms.ChoiceField(choices=[(color.id, color.name) for color in Resitel.objects.all()])
|
||||
|
||||
class NahrajReseniForm(forms.ModelForm):
|
||||
class Meta:
|
||||
|
|
|
@ -416,12 +416,7 @@ class NahrajReseniView(LoginRequiredMixin, CreateView):
|
|||
return super().get(request, *args, **kwargs)
|
||||
|
||||
def get_initial(self):
|
||||
nadproblem_id = self.kwargs["nadproblem_id"]
|
||||
return {
|
||||
"nadproblem_id": nadproblem_id,
|
||||
"problem": [] if m.Problem.objects.filter(stav=m.Problem.STAV_ZADANY, nadproblem__id=nadproblem_id) else nadproblem_id
|
||||
|
||||
}
|
||||
return {"nadproblem_id": self.kwargs["nadproblem_id"]}
|
||||
|
||||
def get_context_data(self,**kwargs):
|
||||
data = super().get_context_data(**kwargs)
|
||||
|
|
Loading…
Reference in a new issue