Reputation: 683
I'm neewbie in pythonanywhere. I've just deploy my django project and all seems to be OK except I need initialize ma database first and I don't know how to do this. I can I get a python shell?
thanks for help
Upvotes: 1
Views: 821
Reputation: 24012
You can log in with SSH and then you will be able to populate your database through the command line or a shell
ssh <username>@ssh.pythonanywhere.com
Look at: https://help.pythonanywhere.com/pages/SSHAccess
Upvotes: 0
Reputation: 334
To initialize your database in django first you want to type:
python manage.py makemigrations
then type:
python manage.py migrate
Hope this helps, if you still do not understand check the django documentation:
https://docs.djangoproject.com/en/3.1/intro/tutorial01/ https://docs.djangoproject.com/en/3.1/intro/tutorial02/
read page 1 and 2 of the django tutorial
Upvotes: 1