R
R
Radiss2020-08-16 23:08:25
Django
Radiss, 2020-08-16 23:08:25

How to create a user in the database in heroku?

I cloned a repository from a project with an admin part. Authorization is required when entering the application. Locally I created a command ./manage.py createsuperuser

and everything works.
But how to do it in heroku?

Then the following:

heroku create
git push heroku master
heroku ps:scale web=1
heroku run python manage.py migrate

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-08-17
@radiss

Either go to the console and execute in the same way ./manage.py createsuperuser, or create a fixture and add its loading to the release phase.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question