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

Database migration failed #16

Open
zongxindu opened this issue Jan 1, 2022 · 0 comments
Open

Database migration failed #16

zongxindu opened this issue Jan 1, 2022 · 0 comments

Comments

@zongxindu
Copy link

zongxindu commented Jan 1, 2022

I just followed the installation steps. when I am running this command:
python manage.py migrate
The program throws an exception:
django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable
This is defined in the setting.py file:
SECRET_KEY = env('SECRET_KEY')
I don't know how to solve this problem, then randomly generated a string of text as the SECRET_KEY:
SECRET_KEY='2ap4_#)wk@5)3lsh6idzxwaouy6)*(5z#w(3atk0%a5!+-29j-
but, when I am running the command: python manage.py migrate
The program throws another exception:
django.core.exceptions.ImproperlyConfigured: Set the DATABASE_URL environment variable
I am sorry, I tried to learn the basics of Django, but I didn't know anything about Web development, or database, and after looking at some of the basics of Django, I still didn't know how to Debug this error.

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