Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Commit 7ab8557

Browse files
author
Mateja
committed
Paginated search results
1 parent 9595a28 commit 7ab8557

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

web/forms/event_form.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ class SearchEventForm(forms.Form):
159159
required=False,
160160
widget=forms.TextInput(attrs={'placeholder': 'Search some serious events', 'class': 'form-control'})
161161
)
162+
all_events = forms.ChoiceField(
163+
label='Include past events',
164+
required=False,
165+
widget=forms.CheckboxInput(attrs={'class': 'form-control search-form-element'}),
166+
#choices=countries
167+
)
162168
country = forms.ChoiceField(
163169
label='Select country',
164170
required=False,

web/templates/pages/search_events.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
</div>
1818
<div class="col-md-12"><hr></div>
1919
</div>
20+
<div class="row">
21+
<div class="col-md-4">
22+
<label for="id_include_past">{{ form.all_events.label }}</label>
23+
{{ form.all_events }}
24+
</div>
25+
</div>
2026
<div class="row">
2127
<div class="col-md-4">
2228
<label for="id_country">{{ form.fields.country.label }}</label>

0 commit comments

Comments
 (0)