On Jul 2, 12:29 pm, Andrew Turner <[email protected]> wrote: > Talking to myself again, I've changed the save method slightly:- > > def save(self): > if not self.slug: > name = hashlib.sha1(str(random.random())).hexdigest()[:16] > self._my_filename = '%s.jpg' % (name) > self.slug = name > super(Post, self).save()
Oh, and it's obviously supposed to read super(Photo, self).save() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

