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# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -