I would like to modify the url to access user profile. OSQA use permalink() to generate the profile url
The default link is http://meta.osqa.net/users/2836/nhatthinh
And I want to change it to http://meta.osqa.net/users/nhatthinh
So, I modify the function get_profile_url follow as:
@models.permalink
def get_profile_url(self):
return ('user_profile', [slugify(self.username)])
And I also modify the url in forum\urls.py follow as:
url(r'^%s/(.*)/$' % _('users/'), app.users.user_profile, name='user_profile'),
But the result falls short of my expectation.
OSQA generates a link is http://meta.osqa.net/users//nhatthinh
So, how can I fix this issue?
Thank you so much.