Re: Custom filterspec

2010-05-24 Thread Daniel Roseman
On May 24, 5:36 pm, Thales wrote: > Good afternoon, > > I am trying to make this snippet work:http://djangosnippets.org/snippets/1051/ > > But I am always getting the error "__init__() got an unexpected > keyword argument 'field_path'", We'll need to see the actual traceback. `field_path` doesn

Custom filterspec

2010-05-24 Thread Thales
Good afternoon, I am trying to make this snippet work: http://djangosnippets.org/snippets/1051/ My files are like this: ## admin.py from django.contrib import admin from models import Pessoa import filterspec class AdminPessoa(admin.ModelAdmin): list_filter = ['name'] pass admin.sit

Re: How do I use a custom FilterSpec?

2006-06-23 Thread Adrian Holovaty
On 6/23/06, MattiasN <[EMAIL PROTECTED]> wrote: > You say this is sketchy because (as you say) it uses the underlying > implementation. Is FilterSpec not something you are supposed to be able > to define by yourself? Or will there be some "official" fix for this? > Like FilterSpec.register_before(

Re: How do I use a custom FilterSpec?

2006-06-23 Thread MattiasN
Yes, that did it. Thank you very much! You say this is sketchy because (as you say) it uses the underlying implementation. Is FilterSpec not something you are supposed to be able to define by yourself? Or will there be some "official" fix for this? Like FilterSpec.register_before(my_func, my_filt

Re: How do I use a custom FilterSpec?

2006-06-22 Thread Adrian Holovaty
On 6/22/06, MattiasN <[EMAIL PROTECTED]> wrote: > However I don't understand what I should change. "beacause each > FilterSpec now takes a model parameter" doesn't mean anything to me... > How do I register the filterspec now? Where should I place it and so > on. > > (The dirty fix is of course pa

How do I use a custom FilterSpec?

2006-06-22 Thread MattiasN
A while back I created a customer filter for use in admin. It worked fine, but after svn up I noticed it didn't work anymore. So I found this. http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/filterspecs.py r3136 The commit message says: "Added AllValuesFilterSpec to admin