Autocompletion in event selection

This commit is contained in:
Raphael Michel
2017-06-05 19:28:52 +02:00
parent 6f7281b0f5
commit 0cecc168b6
7 changed files with 172 additions and 23 deletions

View File

@@ -252,7 +252,7 @@ def user_event_widgets(**kwargs):
user = kwargs.pop('user')
widgets = []
events = user.get_events_with_any_permission().order_by('-date_from', 'name').select_related('organizer')
events = user.get_events_with_any_permission().order_by('-date_from', 'name').select_related('organizer')[:100]
for event in events:
widgets.append({
'content': '<div class="event">{event}<span class="from">{df}</span><span class="to">{dt}</span></div>'.format(