Задать вопрос

Тел: +7 965 3737 888

500

Просмотров

0

Ответов

AlphabeticFilterSpec

<p><strong>WARNING: a better version of this snippet you can see at <a href="http://foothold.ru/knowledge/detail/alphabetic-filter-for-admin.html">http://foothold.ru/knowledge/detail/alphabetic-filter-for-admin.html</a></strong></p>
<p>This filter spec is util only for who uses newforms-admin branch.</p>
<p>To use this, you need to extend the class ModelAdmin for your model class, like the MyClassAdmin class in the code, with attention to the following lines:</p>
# Appends the filter
cl.filter_specs.insert(0, AlphabeticFilterSpec(cl.lookup_opts.get_field('name'),request,cl.params,self.model,self))

Вопрос полезен? Да0/Нет0
file_2602.py(2.7Кб)
None