Can I change Django's auth_user.username field to be 100 chars long without breaking anything?

前端 未结 7 1497
眼角桃花
眼角桃花 2021-02-06 05:31

Before somebody marks this question as a duplicate of this question Can django\'s auth_user.username be varchar(75)? How could that be done? or other such questions on SO, pleas

7条回答
  •  鱼传尺愫
    2021-02-06 06:11

    Create a user profile model, add your very-long-username field there, and use it. of course this renders the genuine username field useless, but it is much better than hacking Django code, which will get you into trouble when you need to upgrade it.

提交回复
热议问题