confirmation dialogue before delete object

2010-09-15 Thread dimitri pater - serpia
hi, i have this view for adding or editing or deleting an object: (actually it is a bit more complex as it also includes creating end changing an object) def manage_component(request,project_id,a_id,b_id=None,delete=None): if not b_id: # form to add object #etc.. elif b_id and not

Re: group querysets in template

2009-09-24 Thread dimitri pater - serpia
> - in the view just get all the books, ordered by author > - in the template iterate over the books, with an {% ifchanged > book.author %} to display the author name thanks Javier, I will try the 'ifchanged' template tag (http://docs.djangoproject.com/en/dev/ref/templates/builtins/#ifchanged).

Re: Firefox search plugin for Django documents

2009-09-24 Thread dimitri pater - serpia
2009/9/24 玉东 : > Hi, guys, > > I've made a firefox search plugin for django documents. It can save your > time if you often search the official django documents because you don't > have to visit the djangoproject.com first. Just type in the search box, > press enter and you'll see the page of the

Re: group querysets in template

2009-09-24 Thread dimitri pater - serpia
but that was a bit messy indeed > > But this is not so good I think. > > nausikaa > > > > On Sep 24, 9:49 am, dimitri pater - serpia > wrote: >> Hi, >> >> say, I have two related models: >> >> class Author(models.Model): >&

Re: list some django-powered web sites

2009-09-24 Thread dimitri pater - serpia
On Thu, Sep 24, 2009 at 10:06 AM, Anrs wrote: > hi everybody, We want to develop a Bussiness web site with Django framework, > but we can't decide django's performance. So, would you list some > large-scale web sites that used django for us? http://djangosites.org/ > > thanks. > > -- > love, an

Re: django vps hosts

2009-09-24 Thread dimitri pater - serpia
On Thu, Sep 24, 2009 at 3:54 AM, neri...@gmail.com wrote: > > I think I'm ready to finally switch to a django vps host due to > problems with django on DreamHost. Can anyone recommend a good vps > host? try rimuhosting.com > > > --~--~-~--~~~---~--~~ You receive

group querysets in template

2009-09-24 Thread dimitri pater - serpia
Hi, say, I have two related models: class Author(models.Model): name = models.CharField() class Book(models.Model): author = models.ForeignKey(Author) titel = models.CharField() isbn = models.CharField() and I want to group them and display them in a template like this: Stephen King:

Re: value bound (choice)field

2009-09-14 Thread dimitri pater - serpia
for anyone who is interested, I created a template filter to do this (see http://groups.google.com/group/django-users/browse_thread/thread/74e31c74cfd9469a) On Tue, Sep 15, 2009 at 12:33 AM, dimitri pater - serpia wrote: > Hello, > > I am trying to get a value from a bound field (a ch

value bound (choice)field

2009-09-14 Thread dimitri pater - serpia
Hello, I am trying to get a value from a bound field (a choicefield) to a template. Obviously form.field.value does not work. Any ideas somebody? thanks in advance, dimitri --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: inlineformset_factory and changing data set in form

2009-09-14 Thread dimitri pater - serpia
formfield_callback argument was the solution to my problem On Mon, Sep 14, 2009 at 4:18 PM, dimitri pater - serpia wrote: > Hello, > > Suppose we have two models: > > CH_AUTH = ((u'J', u'John'),(u'P', u'Peter'),(u'M', u'Ma

inlineformset_factory and changing data set in form

2009-09-14 Thread dimitri pater - serpia
Hello, Suppose we have two models: CH_AUTH = ((u'J', u'John'),(u'P', u'Peter'),(u'M', u'Marc'),) class Publisher(models.Model): name = models.CharField(max_length=100) class Book(models.Model): publisher = models.ForeignKey(Publisher) author = models.CharField(max_length=1, cho