On 6/30/07, Young Gyu Park <[EMAIL PROTECTED]> wrote: > > class Author(models.Model): > > user = models.ForeignKey(User,related_name='authors') > > class Blog(models.Model): > > author = models.ForeignKey(Author,related_name='blogs') > > class Entry(models.Model): > > blog = models.ForeignKey (Blog,related_name='entries') > > def get_absolute_url(self): > > y = str(self.Post_Date.year) > > m = str(self.Post_Date.month).zfill(2) > > d = str(self.Post_Date.day).zfill(2) > > s = str(self.Slug) > > return ('entry_detail', None, {'username': User.username, 'id': > > self.id}) > > get_absolute_url = permalink(get_absolute_url) > > But I don't know how to trace the user.username in this model.
Looks like it's self.blog.author.user.username if you want to refer to it in Entry. Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---