Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registeradmin not working #234

Closed
0b11stan opened this issue Oct 10, 2022 · 0 comments
Closed

registeradmin not working #234

0b11stan opened this issue Oct 10, 2022 · 0 comments

Comments

@0b11stan
Copy link
Contributor

After running shynet, I'm trying to run the manage.py registeradmin as described in the documentation.

However, my output is showing the following traceback :

Traceback (most recent call last):
  File "/usr/src/shynet/./manage.py", line 21, in <module>
    main()
  File "/usr/src/shynet/./manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/usr/src/shynet/core/management/commands/registeradmin.py", line 23, in handle
    password = get_random_string()
TypeError: get_random_string() missing 1 required positional argument: 'length'

The get_random_string() for django.utils.crypto need the length of the generated string.

bash-5.1$ python
Python 3.10.4 (main, Apr 20 2022, 01:21:48) [GCC 10.3.1 20210424] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.utils.crypto import get_random_string
>>> get_random_string()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: get_random_string() missing 1 required positional argument: 'length'
>>> get_random_string(10)
'U0akMeFQHJ'

I'll try to send a pull request in the following days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant