Open GoogleCodeExporter opened 8 years ago
Check out author's page
http://jannisleidel.com/2008/11/autocomplete-form-widget-foreignkey-model-fields
/
You need to replace __call__() with
def get_urls(self):
urls = super(MessageAdmin,self).get_urls()
search_url = patterns('',
(r'^search/$', self.admin_site.admin_view(self.search))
)
return search_url + urls
and include 'from django.conf.urls.defaults import *' in admin.py
Original comment by marko.dv...@gmail.com
on 26 Aug 2009 at 11:36
hi I run into the same issue but the fix above didn't work for me.. I get this
error:
global name 'MessageAdmin' is not defined....
any solution?
Original comment by michele.pasin
on 28 Sep 2009 at 5:15
ops sorry!! doing copy/paste without thinking never pays back does it?
Obviously we need to modify the
example above (which is applies to Jannis Leidel blog post) with the code in
django-command-extensions...
that is:
def get_urls(self):
urls = super(ForeignKeyAutocompleteAdmin,self).get_urls()
search_url = patterns('',
(r'^foreignkey_autocomplete/$', self.admin_site.admin_view(self.foreignkey_autocomplete))
)
return search_url + urls
Original comment by michele.pasin
on 28 Sep 2009 at 5:32
Original issue reported on code.google.com by
ramu...@gmail.com
on 25 May 2009 at 8:27