Jannis Liedel writes about a great widget for FK fields
http://jannisleidel.com/2008/11/autocomplete-form-widget-foreignkey-model-fields/
I manged to get it to work on one site, but not on others.
Widget uses admin search functionality through url:
/admin/app/model/search/?
q=foo&search_fields=m
Article model has MM field to Authors. Editing an Article 123 would
than be:
>>> f = ArticleForm( instance=Article.objects.get(id=123) )
But than:
>>> f.is_valid()
False
>>> f.data
{}
>>> f._errors
{}
>>> f.is_bound
False
Closer look at the form object "author" field:
>>> f.fields['author'].
an option for
> me but it might help
> you.http://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-op...
>
> On Apr 16, 3:40 am, maco wrote:
>
> > My model has two Foreign Keys. Each FK has 4000 entries or more. In
> > admin.py I use filter_horizontal for those FK.
>
My model has two Foreign Keys. Each FK has 4000 entries or more. In
admin.py I use filter_horizontal for those FK.
I noticed that JS widget is slow both on first render of admin page
(add item) and on every selection of an FK item inside the widget. I
takes 5 seconds AFTER admin page already load
Can you share the logic behind the models and views you use. Don't
need to go into details, just the philosophy behind it, eg.
http://orestis.gr/en/blog/2007/05/14/international-part3/
cheers
On Jan 26, 5:36 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote:
> Piotr, having django-multilingual featu
ers/django-full-text-search/
On 24 dec., 09:46, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-12-23 at 05:37 -0800, maco wrote:
> > Yes, I've seen that, thanks anyway.
>
> > I've been googling for the past few days on this topic and I'm am
rs
m
On 22 dec., 05:47, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2007-12-21 at 14:36 -0800, maco wrote:
> > Can someone please write a quick-start for this search engine on
> > Django. I've already set up django app and sphinix search engine in a
> >
Can someone please write a quick-start for this search engine on
Django. I've already set up django app and sphinix search engine in a
shell. There are some basic instructions in the snippets, but are not
that self explanatory to a noob like me :(
I got lost with how to implement this in the proj
Try this one:
http://www.djangoproject.com/documentation/db-api/#get-foo-filename
To retrieve a image or file absolute url simply use:
{{ object.get_myImageObject_url }}
Absolute URL is compiled according to settings.py definition of
MEDIA_URL and therefore changes automatically at deployment.
9 matches
Mail list logo