Giter VIP home page Giter VIP logo

Comments (9)

kfdm avatar kfdm commented on September 27, 2024 1

Promgen is a fairly standard Django app, so by default there are no users created. You can create a new user from the CLI, using the Django createsuperuser command
promgen createsuperuser

from promgen.

or0or1 avatar or0or1 commented on September 27, 2024

thanks very much

from promgen.

kfdm avatar kfdm commented on September 27, 2024

You're welcome. I'll try to add that to the README to make things more clear :)

from promgen.

or0or1 avatar or0or1 commented on September 27, 2024

@kfdm I meet a question。

for this command, I do not known the password.
promgen createsuperuser --username root --noinput --email [email protected]

for this command, it will be wrong msg as following.
promgen createsuperuser --username root --email [email protected]

Superuser creation skipped due to not running in a TTY. You can run manage.py createsuperuser in your project to create one manually.
Traceback (most recent call last):
File "/usr/local/bin/promgen", line 11, in
load_entry_point('Promgen', 'console_scripts', 'promgen')()
File "/usr/src/app/promgen/manage.py", line 20, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.5/site-packages/django/core/management/init.py", line 367, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.5/site-packages/django/core/management/init.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.5/site-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 63, in execute
return super(Command, self).execute(*args, **options)
File "/usr/local/lib/python3.5/site-packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.5/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 183, in handle
self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
TypeError: create_superuser() missing 1 required positional argument: 'email'

from promgen.

kfdm avatar kfdm commented on September 27, 2024

This is the user that you want to create to login from the UI. It is separate from the linux users.
I typically run it once manually in a separate instance (instead of trying to run it through configuration management)

I also tend to run it in 'interactive mode' as just promgen createsuperuser and let it prompt me for each value.

from promgen.

or0or1 avatar or0or1 commented on September 27, 2024

@kfdm
only run promgen createsuperuser,the err msg as following. Maybe the reason for the docker.

Superuser creation skipped due to not running in a TTY. You can run manage.py createsuperuser in your project to create one manually.

from promgen.

kfdm avatar kfdm commented on September 27, 2024

I don't remember the command exactly, but you should be able to run it as a 'one off' command with docker

docker -it <containername> promgen createsuperuser

  • -i, --interactive Keep STDIN open even if not attached
  • -t, --tty Allocate a pseudo-TTY

You will also want to pass the normal Volume and Environment flags to your container.

from promgen.

or0or1 avatar or0or1 commented on September 27, 2024

@kfdm you are right. thanks.

docker exec -it promgen_web_1 promgen createsuperuser

from promgen.

kfdm avatar kfdm commented on September 27, 2024

Added some notes in 33d95c2 so I will close this now. Please feel free to open a new issue if you have additional questions.

from promgen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.