|
|
@ -477,7 +477,15 @@ class Problem(SeminarModelBase): |
|
|
|
return reverse('admin:seminar_problemnavrh_change', args=(self.id, )) |
|
|
|
|
|
|
|
def body_v_zavorce(self): |
|
|
|
return u"({}\u2009b)".format(self.body) if self.body else "" |
|
|
|
"""Vrať string s body v závorce jsou-li u problému vyplněné, jinak '' |
|
|
|
|
|
|
|
Je-li desetinná část nulová, nezobrazuj ji. |
|
|
|
""" |
|
|
|
pocet_bodu = None |
|
|
|
if self.body: |
|
|
|
b = self.body |
|
|
|
pocet_bodu = int(b) if int(b) == b else b |
|
|
|
return u"({}\u2009b)".format(pocet_bodu) if self.body else "" |
|
|
|
|
|
|
|
|
|
|
|
@reversion.register(ignore_duplicate_revisions=True) |
|
|
|