On Saturday, January 9, 2021 at 6:38:56 PM UTC+5:30 Vishesh Mangla wrote:
Hi, please help me create this UserManager child class. I 'm stuck up on this. I also need to divide my users into three groups.For this I extended the migrations file. https://dpaste.org/9VSd. But running `makemigrations` gives no changes detected.
Please help with this issue too.Thanks in advance.On Saturday, January 9, 2021 at 6:35:34 PM UTC+5:30 Vishesh Mangla wrote:(venv) PS C:\Users\Dell\OneDrive\Desktop\djangodev\mass> python manage.py createsuperuser
PAN ID: 6785
Email: s@g
Error: Enter a valid email address.
Email: s...@gmail.com
Name: fjghg
Type: fg
Error: Value 'fg' is not a valid choice.
Type: ADM
Holding: 568
Password:
Password (again):
This password is too short. It must contain at least 8 characters.
Bypass password validation and create user anyway? [y/N]: y
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
utility.execute()
File "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 79, in execute
return super().execute(*args, **options)
File "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py", line 371, in execute
output = self.handle(*args, **options)
File "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 189, in handle
self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
File "C:\Users\Dell\OneDrive\Desktop\djangodev\mass\base\models.py", line 25, in create_superuser
return super()._create_user(PAN_ID, password, **extra_fields)
AttributeError: 'super' object has no attribute '_create_user'
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6ff80f40-30e1-4c09-9dab-7eae9461d6b2n%40googlegroups.com.
No comments:
Post a Comment