On Sat, Aug 04, 2007 at 12:09:07PM +0200, Michael Elsdoerfer wrote:
>
> > def save(self):
> > if self.id is not None:
> > old_self = self.__class__.get(id = self.id)
> > if self.id is None or (old_self.city != self.city) or (
> > old_self.state != self.state):
> >
> def save(self):
> if self.id is not None:
> old_self = self.__class__.get(id = self.id)
> if self.id is None or (old_self.city != self.city) or (
> old_self.state != self.state):
> self.geocode = self.get_geocode()
> super(SiteUser, self).save()
You can also
On Fri, Aug 03, 2007 at 08:57:10PM -, [EMAIL PROTECTED] wrote:
> For anyone trying this, I had to make it
> old_self = self.__class__.objects.get(id = self.id)
> instead of
> old_self = self.__class__.get(id = self.id)
Right, that's what I meant :)
-Forest
--
Forest Bond
On Aug 3, 3:44 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Thanks!
>
> On Aug 3, 3:04 pm, Forest Bond <[EMAIL PROTECTED]> wrote:
>
> > On Fri, Aug 03, 2007 at 07:37:17PM -, [EMAIL PROTECTED] wrote:
>
> > > In my site_users model (which extends auth user), I've got:
>
> > > def
Thanks!
On Aug 3, 3:04 pm, Forest Bond <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 03, 2007 at 07:37:17PM -, [EMAIL PROTECTED] wrote:
>
> > In my site_users model (which extends auth user), I've got:
>
> > def save(self):
> > self.geocode = self.get_geocode()
> >
On Fri, Aug 03, 2007 at 07:37:17PM -, [EMAIL PROTECTED] wrote:
>
> In my site_users model (which extends auth user), I've got:
>
> def save(self):
> self.geocode = self.get_geocode()
> super(SiteUser, self).save() # Call the "real" save() method.
>
> get_geocode makes a
In my site_users model (which extends auth user), I've got:
def save(self):
self.geocode = self.get_geocode()
super(SiteUser, self).save() # Call the "real" save() method.
get_geocode makes a call out to google's geocoding service, gives the
city and state, and returns the
7 matches
Mail list logo