Best way to add convenience methods to a Django Auth User model?

前端 未结 5 1682
春和景丽
春和景丽 2020-12-13 19:34

I want to add a convenience/model method to the django.contrib.auth.models.User model. What is the best practice for doing this since, last time I checked, ext

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 20:26

    I prefer to use the same UserProfile across various projects I develop and extend User for any project-specific needs. So, common functionality goes to UserProfile, and project-specific functionality goes to custom User. I have not had any adverse effects of having a subclassed User model yet, I wonder if there still exist any with Django 1.0+.

提交回复
热议问题