python - How to change method in existing class -


i want following:

  • i want change get_absolute_url method in user django.auth class.

how can that?

if using django 1.5 or greater, can redefine get_absolute_url instance method on custom user model class.

prior 1.5, clean way accomplish create own proxy model stand in place of django.contrib.auth.models.user, get_aboslute_url instance method construct absolute urls don't follow /users/%username%/ pattern.


Comments

Popular posts from this blog

c# - Pausing a storyboard on TabItem mouse over -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -

mongodb - Struggling to get ordered results from the last retrieved article, given array of elements to search in -