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/?

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: >>>

Re: Admin widget for filter_vertical and filter_horizontal slow

2009-04-17 Thread maco
t wasn't 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 <marko.dvor...@gmail.com> wrote: > > > My model has two Foreign Keys. Each FK has 4000 entries or more. In > > ad

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

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

Re: Sphinx Search Engine ORM for Django models

2007-12-24 Thread maco
-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 amazed > > that there i

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.