It could be that I don't understand the question, but don't you need to use reverse() to resolve the url from the model? A quick google search found this blog posting showing what I thought was the way to do it: http://blog.micampe.it/articles/2007/01/06/a-little-django-feature-nobody-tells-you-about
On Jun 29, 9:59 am, "Young Gyu Park" <[EMAIL PROTECTED]> wrote: > I think it is better to show my code > > This is my models's get_absoute_url function > > def get_absolute_url(self): > return ('blog.views.tag_main', None, {'username':User.username, > 'slug': str(self.Slug)}) > get_absolute_url = permalink(get_absolute_url) > > This is a part of my urls.py which is equivalent to above model. > > urlpatterns = patterns('blog.views', > (r'^(?P<username>\w+)/$', 'main'), > (r'^(?P<username>\w+)/page/(?P<page>\d+)/$', 'main'), > (r'^(?P<username>\w+)/tag/(?P<slug>[-\w]+)/$', 'tag_main'), > (r'^(?P<username>\w+)/id/(?P<id>\d+)/$', 'entry_detail'), > ) > > On 6/29/07, Young Gyu Park <[EMAIL PROTECTED]> wrote: > > > > > I try to get the proper get_absolute_url. > > > Under the this circumstances. > > > I have username parameter in my URL. > > > like thishttp://.../(?<username> ..... > > > I need to pass this username parameter to the get_absolute_url function. > > > But I don't know how to get the proper username. Because the User model is > > out of the the model where I manage the get_absolute_url. > > > Can you have any clue? or Is there anyone who have experienced the similar > > this? > > > Thanks always. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---