Fix (tab. doš. řešení): strftime nefunguje, jak jsem si myslel
This commit is contained in:
parent
3476198c27
commit
4b03a2d23c
1 changed files with 4 additions and 2 deletions
|
@ -155,8 +155,10 @@ class OdevzdavatkoTabulkaFiltrForm(forms.Form):
|
|||
|
||||
result = []
|
||||
|
||||
result.append((
|
||||
strftime(DATE_FORMAT, datetime.date.min.timetuple()), f"Odjakživa"))
|
||||
date_str = strftime(DATE_FORMAT, datetime.date.min.timetuple())
|
||||
if date_str[0] == '1': # Někde očividně vrací strftime rok bez nul.
|
||||
date_str = "000" + date_str
|
||||
result.append((date_str, f"Odjakživa"))
|
||||
|
||||
for deadline in m.Deadline.objects.filter(
|
||||
deadline__lte=timezone.now(),
|
||||
|
|
Loading…
Reference in a new issue