python - Set `get_absolute_url` in Django auth -


i'm using django's built-in auth model.

how can set get_absolute_url without substituting entire auth model custom auth model?

you need substitute user model. can inherit abstractuser, defines fields already, need override method want:

class myuser(abstractuser):     def get_absolute_url(self):         return ... 

and auth_user_model = 'my_app.myuser' in settings.py, , you're go.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -