akveo / ngx-admin-bundle-support

Support repository for ngx-admin backend bundles with issues tracking, instructions and code samples
58 stars 32 forks source link

creating super user fails in django bundle #53

Open Yair-Karmy opened 4 years ago

Yair-Karmy commented 4 years ago

this is the bug scenario:

after the makemigrations and migrate we run:

python manage.py createsuperuser

and get the following error:

2019-12-09 15:13:34,606 passlib.registry DEBUG registered 'argon2' handler: <class 'passlib.handlers.argon2.argon2'> 2019-12-09 15:13:34,607 passlib.registry DEBUG registered 'bcrypt' handler: <class 'passlib.handlers.bcrypt.bcrypt'> 2019-12-09 15:13:34,609 passlib.registry DEBUG registered 'pbkdf2_sha1' handler: <class 'passlib.handlers.pbkdf2.pbkdf2_sha1'> 2019-12-09 15:13:34,609 passlib.registry DEBUG registered 'pbkdf2_sha256' handler: <class 'passlib.handlers.pbkdf2.pbkdf2_sha256'> 2019-12-09 15:13:34,610 passlib.registry DEBUG registered 'django_pbkdf2_sha256' handler: <class 'passlib.handlers.django.django_pbkdf2_sha256'> 2019-12-09 15:13:34,939 asyncio DEBUG Using proactor: IocpProactor 2019-12-09 15:13:34,942 django.db.backends DEBUG (0.000) SELECT name, type FROM sqlite_master WHERE type in ('table', 'view') AND NOT name='sqlite_sequence' ORDER BY name; args=None 2019-12-09 15:13:34,954 django.db.backends DEBUG (0.000) SELECT "django_migrations"."id", "django_migrations"."app", "django_migrations"."name", "django_migrations"."applied" FROM "django_migrations"; args=() Id: 0 Password: Password (again): This password is too short. It must contain at least 8 characters. This password is too common. This password is entirely numeric. Bypass password validation and create user anyway? [y/N]: y Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "c:\work_projects\maglan300\Backend\maglan300\maglan300_env\lib\site-packages\django\core\management__init__.py", line 401, in execute_from_command_line utility.execute() File "c:\work_projects\maglan300\Backend\maglan300\maglan300_env\lib\site-packages\django\core\management__init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "c:\work_projects\maglan300\Backend\maglan300\maglan300_env\lib\site-packages\django\core\management\base.py", line 328, in run_from_argv self.execute(*args, cmd_options) File "c:\work_projects\maglan300\Backend\maglan300\maglan300_env\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 79, in execute return super().execute(*args, *options) File "c:\work_projects\maglan300\Backend\maglan300\maglan300_env\lib\site-packages\django\core\management\base.py", line 369, in execute output = self.handle(args, options) File "c:\work_projects\maglan300\Backend\maglan300\maglan300_env\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) AttributeError: 'Manager' object has no attribute 'create_superuser'

jcanning commented 4 years ago

Did you ever get this working? I also cannot create a superuser account. I cannot even create a user through the register option. How can this be broken right after the first step?

My error is different, your error looks like the password is too short but it looks like the create super user is removed from this code.

AttributeError: 'Manager' object has no attribute 'create_superuser'

I paid for this and cannot use it right out of the gate :(

eranzim commented 4 years ago

I do remember fixing it, but unfortunately I don't remember how... I do remember that I overrode the createsuperuser command, but I don't remember if that was necessary for the fix or because we wanted some extra functionality. Check the logs, they might prove useful.

Good luck :)