I was actually thinking to myself "There must be some way to auto-
populate a full_name field when I create the object." but I didn't
think to override the save method.  Shows you how much I still need to
learn; thanks for the tip!

-Adam


> The SimplestThinkThatCouldPossiblyWork (while certainly not the
> smartest) would be to add a full_name field to the Contact model,
> hidden in the admin, and autopopulated from the first_name and
> last_name fields whenever the Contact instance is saved. This last
> point can be adressed overriding the save() method of the Contact
> model, ie
>
>    def save(self):
>        self.full_name = "%s %s"  % (self.first_name, self.last_name)
>        super(Contact, self).save()
>
> HTH
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to