On Thu, Jul 16, 2009 at 04:09:36AM -0700, Phil wrote: > 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() > > after all i got: > fulltitle = title = 'sampletext' > i was expecting to have: > fulltitle = 'QWERTY' > title = 'sampletext'
Why should it do that? The only line containing QWERTY is commented out, and even if it wasn't commented out it does nothing. Maybe you meant to say: self.fulltitle = self.title = 'QWERTY' As such, what you have is: self.fulltitle = self.title self.title = 'sampletext' self.save() So the new value of self.fulltitle depends on what self.title previously was. -- Brian May <br...@microcomaustralia.com.au> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---