forked from DGNum/gestioCOF
Instantiate the Compose classes in their own file
This commit is contained in:
parent
7caee5665b
commit
9ac030fd16
4 changed files with 13 additions and 7 deletions
|
@ -47,7 +47,7 @@ class COFLDAPSearch(autocomplete.LDAPSearch):
|
|||
return reverse("clipper-registration", args=(clipper.clipper, clipper.fullname))
|
||||
|
||||
|
||||
class COFSearch(autocomplete.Compose):
|
||||
class COFAutocomplete(autocomplete.Compose):
|
||||
search_units = [
|
||||
("members", COFMemberSearch()),
|
||||
("others", COFOthersSearch()),
|
||||
|
@ -55,4 +55,4 @@ class COFSearch(autocomplete.Compose):
|
|||
]
|
||||
|
||||
|
||||
cof_search = COFSearch()
|
||||
cof_autocomplete = COFAutocomplete()
|
||||
|
|
|
@ -25,7 +25,7 @@ from django_cas_ng.views import LogoutView as CasLogoutView
|
|||
from icalendar import Calendar, Event as Vevent
|
||||
|
||||
from bda.models import Spectacle, Tirage
|
||||
from gestioncof.autocomplete import COFSearch
|
||||
from gestioncof.autocomplete import cof_autocomplete
|
||||
from gestioncof.decorators import BuroRequiredMixin, buro_required, cof_required
|
||||
from gestioncof.forms import (
|
||||
CalendarForm,
|
||||
|
@ -950,4 +950,4 @@ class UserAutocompleteView(BuroRequiredMixin, Select2QuerySetView):
|
|||
|
||||
class RegistrationAutocompleteView(BuroRequiredMixin, AutocompleteView):
|
||||
template_name = "gestioncof/search_results.html"
|
||||
search_composer = COFSearch()
|
||||
search_composer = cof_autocomplete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue