Re: ForeignKey/ManyToManyField translation via verbose_name does not work.

2009-06-09 Thread Liubomir.Petrov
invalid. On Jun 8, 5:47 am, "Liubomir.Petrov" wrote: > Update: My mistake, seems that only ManyToManyField is not working. > Also posted a ticket here:http://code.djangoproject.com/ticket/11279#comment:2 > > On Jun 8, 3:14 am, Lyubomir Petrov wrote: > >

Re: ForeignKey/ManyToManyField translation via verbose_name does not work.

2009-06-07 Thread Liubomir.Petrov
Update: My mistake, seems that only ManyToManyField is not working. Also posted a ticket here: http://code.djangoproject.com/ticket/11279#comment:2 On Jun 8, 3:14 am, Lyubomir Petrov wrote: > Example: > class Product(models.Model): >         categories = models.ManyToManyField > (Category,verbo

Re: [Solved] Session and models.

2009-04-28 Thread Liubomir.Petrov
On Apr 28, 7:02 pm, "Liubomir.Petrov" wrote: > Found it. It was my mistake using an custom class for grouping the > data into the session. > solved after adding this to the class definition: >         def __getstate__(self): >                 return [self.var1,

Re: Session and models.

2009-04-28 Thread Liubomir.Petrov
] self.var2 = state[1] On Apr 28, 5:04 pm, "Liubomir.Petrov" wrote: > Note: I didnt tested with django.core.serializers, because as it seems > they only serialize a result from queryset and i need a simple row > like: > > class Root(models.Model): >    

Re: Session and models.

2009-04-28 Thread Liubomir.Petrov
Note: I didnt tested with django.core.serializers, because as it seems they only serialize a result from queryset and i need a simple row like: class Root(models.Model): pass # example only class Child(Models.model): child = models.ForeignKey(Root) .. So Root is saved in the session but

Re: Design patterns for create/update view

2009-03-23 Thread Liubomir.Petrov
Yep, i'm already using generic views, but its a big pain (a lot of code) for a single view that embeds create & update in one place. I wanned to ask here, because maybe my approach (the single create/ update view) is not right ? On Mar 23, 12:13 pm, Eric Abrahamsen wrote: > On Mar 23, 2009, at 6