runekaagaard / django-admin-filtrate Goto Github PK
View Code? Open in Web Editor NEWCustom filter framework for the Django Admin.
License: GNU Affero General Public License v3.0
Custom filter framework for the Django Admin.
License: GNU Affero General Public License v3.0
Django 1.4 brings some changes to admin filters, so Filtrate filter will brake. Loudly.
http://yuji.wordpress.com/2011/06/15/django-1-4-alpha-custom-list-filter-rip-filterspec/
I've almost got this working but I'm getting some JS errors which I think are caused by the emptyness of filtrate.js
. Can you recommit this file?
I've also made a few changes to get the code working with my install of Django 1.3. I'll clone and send you a pull request once I get it all working.
Thanks!
I want to register two attributes from the same foreignkey to filter with
This bug is both in the TreeFilter and the DateRangeFilter. The fix is simply to disable the "__alt" fields when submitting an empty ("") value.
Currently the external scripts are loaded using https and http. This breaks if the site runs using https because non-https assets can't be loaded then.
Please remove all protocols from the asset URL's.
Like this:
class Media():
js = (
'//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js',
'//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/i18n/jquery-ui-i18n.min.js',
'filtrate/js/daterangefilter.js',
)
css = {'all': ('//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/flick/jquery-ui.css',)}
This allows the site to use any protocol and the assets are loaded using the same protocol.
Thanks!
In bug #3 you said that field_name is a string. But in __init__.py:20
: setattr(field, unique_name, True)
which gives
AttributeError: 'str' object has no attribute 'orders_models_OrderDateFilter'
in my case.
Django 1.3.1, latest filtrate.
Code:
class OrderDateFilter(filters.DateRangeFilter):
field_name = 'object__date'
def get_title(self):
return u"по дате"
# in model
object = models.ForeignKey(Event, verbose_name=u'событие')
register_filter('object__date', OrderDateFilter)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.