एक custom user model Django के default User को आपकी application की needs के अनुसार बदलता है — fields जोड़ना, login identifier बदलना (जैसे username के बजाय email), या behavior को customize करना। महत्वपूर्ण, अक्सर दोहराई जाने वाली सलाह: एक custom user model को project की शुरुआत में ही set up करें, भले ही आपको अभी changes की आवश्यकता न हो, क्योंकि इसे बाद में बदलना बेहद कष्टदायक होता है।
क्यों: default User सीमित है और बाद में बदलना कठिन
The default User has fixed fields (username, email, first/last name) and uses
USERNAME as the login field. Real apps often need:
✓ Email-based login (no username)
✓ Extra fields (phone, avatar, role, preferences) on the user itself
✓ Custom authentication behavior
