I want to remove username unique and its validation from django i tried but not working

23 views
Skip to first unread message

lalitaquasoft

unread,
Jul 29, 2018, 7:44:23 AM7/29/18
to Django users

Getting this error :

I have tried to change username nul but not working    


IntegrityError at /register/

UNIQUE constraint failed: superuser_user.username

please help me on this issue . It will take too much time `


Phako Perez

unread,
Jul 29, 2018, 8:36:04 PM7/29/18
to django...@googlegroups.com
You want to update an unique field as null which is wrong, you aren’t able to insert update a field marked as unique instead you can remove the entire row, if you wanted to track all users on your table you can add 2 fields to the table, 1 for the update date and other for a flag which can tell you if the user is actually marked as super user or not, this may cause more code needed in your application to let it know about this new feature

Regards

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/089669f1-1f0a-41b9-9684-98363169c8ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages