Browse Source

Druhá várka zarovnání tabulátory

pull/16/head
Pavel "LEdoian" Turinsky 2 years ago
parent
commit
4a0e8e61be
  1. 2
      api/views/autocomplete.py
  2. 18
      seminar/testutils.py
  3. 2
      seminar/views/views_all.py

2
api/views/autocomplete.py

@ -12,7 +12,7 @@ from .helpers import LoginRequiredAjaxMixin
class SkolaAutocomplete(autocomplete.Select2QuerySetView):
""" View k :mod:`dal.autocomplete` pro vyhledávání škol hlavně při registraci. """
def get_queryset(self):
# Don't forget to filter out results depending on the visitor !
# Don't forget to filter out results depending on the visitor !
qs = m.Skola.objects.all()
if self.q:
words = self.q.split(' ') #TODO re split podle bileho znaku

18
seminar/testutils.py

@ -474,15 +474,15 @@ def get_text():
def gen_dlouhe_tema(rnd, organizatori, rocnik, nazev, obor, kod):
tema = Tema.objects.create(
nazev=nazev,
stav=Problem.STAV_ZADANY,
zamereni="M",
autor=rnd.choice(organizatori),
garant=rnd.choice(organizatori),
kod=str(kod),
tema_typ=rnd.choice(Tema.TEMA_CHOICES)[0],
rocnik=rocnik,
abstrakt = lorem.paragraph()
nazev=nazev,
stav=Problem.STAV_ZADANY,
zamereni="M",
autor=rnd.choice(organizatori),
garant=rnd.choice(organizatori),
kod=str(kod),
tema_typ=rnd.choice(Tema.TEMA_CHOICES)[0],
rocnik=rocnik,
abstrakt = lorem.paragraph()
)
# Generování struktury k tématu

2
seminar/views/views_all.py

@ -686,7 +686,7 @@ def formularOKView(request, text=''):
]
context = {
'odkazy': odkazy,
'text': text,
'text': text,
}
return render(request, template_name, context)

Loading…
Cancel
Save