Re: Linking items from the same model

2009-10-18 Thread Михаил Лукин
Look at how list of permissions is filtered in admin interface when adding/editind user. You may use such javascript in your form for dynamic filtering. 2009/10/17 Oleg Oltar > I would really want to add some sort of filtering to that > http://img.skitch.com/20091017-mfs2mbhbuudk2rgquium1bu61d.p

Re: Linking items from the same model

2009-10-18 Thread bruno desthuilliers
On 17 oct, 21:00, Oleg Oltar wrote: > I tried to do it. It works really nice. > > I wonder how can I query all articles related to the current one in a > view... Need some examples. others = current_article.related.all() # or any queryset method > Also currently I see all articles in a listbo

Re: Linking items from the same model

2009-10-17 Thread Oleg Oltar
I would really want to add some sort of filtering to that http://img.skitch.com/20091017-mfs2mbhbuudk2rgquium1bu61d.png On Sat, Oct 17, 2009 at 10:00 PM, Oleg Oltar wrote: > I tried to do it. It works really nice. > > I wonder how can I query all articles related to the current one in a > view..

Re: Linking items from the same model

2009-10-17 Thread Oleg Oltar
I tried to do it. It works really nice. I wonder how can I query all articles related to the current one in a view... Need some examples. Also currently I see all articles in a listbox...And as far as I have more then 200 in the database it's quite hard to select something. Maybe its possible to

Re: Linking items from the same model

2009-10-17 Thread bruno desthuilliers
On 17 oct, 17:45, Oleg Oltar wrote: > Hi > > I am trying to create a model for Article site. I want to link each article > with 3-5 related articles, so what I am thinking of is creating code this > way: > >     class Article (models.Model): >         # Tiny url >         url = models.CharField

Linking items from the same model

2009-10-17 Thread Oleg Oltar
Hi I am trying to create a model for Article site. I want to link each article with 3-5 related articles, so what I am thinking of is creating code this way: class Article (models.Model): # Tiny url url = models.CharField(max_length = 30, unique=True) is_published = mo