fix: tohle předělání mezer na taby vypadalo podezřele, tak jsem to upravil
This commit is contained in:
parent
4a0e8e61be
commit
0e99cf286f
2 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ from .helpers import LoginRequiredAjaxMixin
|
||||||
class SkolaAutocomplete(autocomplete.Select2QuerySetView):
|
class SkolaAutocomplete(autocomplete.Select2QuerySetView):
|
||||||
""" View k :mod:`dal.autocomplete` pro vyhledávání škol hlavně při registraci. """
|
""" View k :mod:`dal.autocomplete` pro vyhledávání škol hlavně při registraci. """
|
||||||
def get_queryset(self):
|
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()
|
qs = m.Skola.objects.all()
|
||||||
if self.q:
|
if self.q:
|
||||||
words = self.q.split(' ') #TODO re split podle bileho znaku
|
words = self.q.split(' ') #TODO re split podle bileho znaku
|
||||||
|
|
|
@ -2,6 +2,6 @@ from rest_framework.permissions import BasePermission
|
||||||
|
|
||||||
class AllowWrite(BasePermission):
|
class AllowWrite(BasePermission):
|
||||||
|
|
||||||
def has_permission(self, request, view):
|
def has_permission(self, request, view):
|
||||||
return request.user.has_perm('auth.org')
|
return request.user.has_perm('auth.org')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue