From 09fa5bef8c0ce3e9cb0c135528fdfa88888d6f5a Mon Sep 17 00:00:00 2001 From: Bachurin Sergey Date: Mon, 1 Jun 2015 00:33:46 +0300 Subject: [PATCH] no text for some autocompletes --- project/docs/autocomplete_light_registry.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/project/docs/autocomplete_light_registry.py b/project/docs/autocomplete_light_registry.py index e820324..f4938db 100644 --- a/project/docs/autocomplete_light_registry.py +++ b/project/docs/autocomplete_light_registry.py @@ -22,7 +22,13 @@ class AutocompleteClient(autocomplete_light.AutocompleteModelBase): return self.order_choices(choices)[0:self.limit_choices] -autocomplete_light.register(Country, name='ACCountry') -autocomplete_light.register(Currency, name='ACCurrency') -autocomplete_light.register(Measure, name='ACMeasure') +class AutocompleteWithEmptyWidget(autocomplete_light.AutocompleteModelBase): + '''Автокомплит единиц измерения + ''' + autocomplete_js_attributes = {'placeholder': u''} + + +autocomplete_light.register(Country, AutocompleteWithEmptyWidget, name='ACCountry') +autocomplete_light.register(Currency, AutocompleteWithEmptyWidget, name='ACCurrency') +autocomplete_light.register(Measure, AutocompleteWithEmptyWidget, name='ACMeasure') autocomplete_light.register(Client, AutocompleteClient, name='ACClient')