Browse Source

drobnosti do pythonu 3

export_seznamu_prednasek
Anet 5 years ago
parent
commit
ca89637c26
  1. 18
      seminar/autocomplete_light_registry.py

18
seminar/autocomplete_light_registry.py

@ -21,7 +21,7 @@ class SkolaAutocomplete(autocomplete_light.AutocompleteModelBase):
attrs = {
# This will set the input placeholder attribute:
'placeholder': u'Škola',
'placeholder': 'Škola',
# This will set the yourlabs.Autocomplete.minimumCharacters
# options, the naming conversion is handled by jQuery
'data-autocomplete-minimum-characters': 1,
@ -46,11 +46,11 @@ class ResitelAutocomplete(autocomplete_light.AutocompleteModelBase):
limit_choices = 15
def choice_label(self, resitel):
return u"%s, %s (%s)" % (resitel.plne_jmeno(), resitel.mesto, resitel.rok_maturity)
return "%s, %s (%s)" % (resitel.plne_jmeno(), resitel.mesto, resitel.rok_maturity)
attrs= {
# This will set the input placeholder attribute:
'placeholder': u'Řešitel',
'placeholder': 'Řešitel',
# This will set the yourlabs.Autocomplete.minimumCharacters
# options, the naming conversion is handled by jQuery
'data-autocomplete-minimum-characters': 1,
@ -75,13 +75,13 @@ class OrganizatorAutocomplete(autocomplete_light.AutocompleteModelBase):
limit_choices = 15
def choice_label(self, organizator):
return u"%s '%s' %s" % (organizator.user.first_name,
return "%s '%s' %s" % (organizator.user.first_name,
organizator.prezdivka,
organizator.user.last_name)
attrs = {
# This will set the input placeholder attribute:
'placeholder': u'Organizátor',
'placeholder': 'Organizátor',
# This will set the yourlabs.Autocomplete.minimumCharacters
# options, the naming conversion is handled by jQuery
'data-autocomplete-minimum-characters': 1,
@ -111,17 +111,17 @@ class ProblemAutocomplete(autocomplete_light.AutocompleteModelBase):
if p.stav == Problem.STAV_ZADANY:
popisek = ""
try:
popisek = u"%s (%s, %s.%s)" % (p.nazev, p.typ, p.cislo_zadani.rocnik.rocnik, p.kod_v_rocniku())
popisek = "%s (%s, %s.%s)".format(p.nazev, p.typ, p.cislo_zadani.rocnik.rocnik, p.kod_v_rocniku())
except:
#popisek = u"%s (%s, %s.%s)" % (p.nazev, p.typ, p.stav)
#popisek = "%s (%s, %s.%s)".format(p.nazev, p.typ, p.stav)
popisek = "CHYBA"
return popisek
else:
return u"%s (%s, %s)" % (p.nazev, p.typ, p.stav)
return "%s (%s, %s)".format(p.nazev, p.typ, p.stav)
attrs = {
# This will set the input placeholder attribute:
'placeholder': u'Problém',
'placeholder': 'Problém',
# This will set the yourlabs.Autocomplete.minimumCharacters
# options, the naming conversion is handled by jQuery
'data-autocomplete-minimum-characters': 1,

Loading…
Cancel
Save