Admin search error (using auto complete FK widget)

2009-08-26 Thread maco
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

ModelForm for Object with ManyToManyField does not validate

2009-06-29 Thread maco
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'].

Re: Admin widget for filter_vertical and filter_horizontal slow

2009-04-17 Thread maco
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. >

Admin widget for filter_vertical and filter_horizontal slow

2009-04-16 Thread maco
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

Re: Django multilingual

2008-01-27 Thread maco
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

Re: Sphinx Search Engine ORM for Django models

2007-12-24 Thread maco
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

Re: Sphinx Search Engine ORM for Django models

2007-12-23 Thread maco
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 > >

Sphinx Search Engine ORM for Django models

2007-12-21 Thread maco
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

Re: static images with built-in django server

2007-11-05 Thread maco
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.