diff options
Diffstat (limited to 'chimere/forms.py')
-rw-r--r-- | chimere/forms.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chimere/forms.py b/chimere/forms.py index 2182a09..4685144 100644 --- a/chimere/forms.py +++ b/chimere/forms.py @@ -834,9 +834,10 @@ class AreaForm(AreaAdminForm): model = Area exclude = [] + CHIMERE_ROUTING_TRANSPORT = [] ROUTING_INIT = None -if hasattr(settings, 'CHIMERE_ROUTING_TRANSPORT'): +if getattr(settings, 'CHIMERE_ROUTING_TRANSPORT', None): CHIMERE_ROUTING_TRANSPORT = [ (idx, _(lbl)) for idx, lbl in settings.CHIMERE_ROUTING_TRANSPORT] if CHIMERE_ROUTING_TRANSPORT: @@ -863,13 +864,11 @@ class RoutingForm(forms.Form): ("%s_%d" % (transport, speed), _(lbl))) -SearchForm = None +class SearchForm(forms.Form): + q = forms.CharField(required=False, label=_('Search'), + widget=forms.TextInput(attrs={'type': 'search'})) if getattr(settings, 'HAYSTACK_SEARCH_ENGINE', None): class SearchForm(HaystackSearchForm): pass -else: - # TODO SEARCH - pass - |