On 6/17/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > def get_absolute_url(self): > return "/articles/" + self.pub_date.replace("-","/") + "/" + self.slug > > But it seems like there'd be a cleaner way (ie. not having to call 'replace')
def get_absolute_url(self): return "/articles/%s/%s" % (self.pub_date.strftime("%Y/%m/%d"), self.slug) -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---