oh, sorry for that - exampling mistake, should be: class Page(models.Model): title = models.CharField(_(u"Title"), max_length=50) fulltitle = models.CharField(_(u"Full Title"), max_length=50) ...
def save(): # title is received from a form, say i've entered 'QWERTY' title1 = str(self.title) self.fulltitle = title1 #fulltitle = title = 'QWERTY' self.title = 'sampletext' super(Page, self).save() Thanks for that correction, Cheers, Phil On Jul 16, 9:50 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Thu, Jul 16, 2009 at 7:09 AM, Phil <megaper...@gmail.com> wrote: > > > Hi All, > > > noticed an interesting behaviour in model save: > > > class Page(models.Model): > > title = models.CharField(_(u"Title"), max_length=50) > > fulltitle = models.CharField(_(u"Full Title"), max_length=50) > > ... > > > def save(): > > # title is received from a form, say i've entered 'QWERTY' > > title1 = str(self.title) > > self.fulltitle = title1 > > #fulltitle = title = 'QWERTY' > > self.title = 'sampletext' > > super(Article, self).save() > > That can't really be the save() for Page because it's calling super(Article, > self)...? > > Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---