How to change get_absolute_url on the user object in Django

Fri Nov 12, 2010

The Django User object maps get_absolute_url to /users/username/ by default. However, we map our user profile pages to a different url.

Found that you can easily change this by using the ABSOLUTE_URL_OVERRIDES setting:

ABSOLUTE_URL_OVERRIDES = {
    'auth.user': lambda o: u'/u/%s/' % o.username,
}