After some testing with Django on PythonAnywhere, I want to get rid of my testing data before I import my actual data to the postgres database. I thought the best way would be to start from scratch and "reset" somehow the database.
Unfortunately there is no button for that on pythonanywhere.com and the documentation does not say anything.
So the question is: how can I "reset" or empty the postgres database on PythonAnywhere?
With the help of the PythonAnywhere support I found a way which worked for me: I deleted and re-created my database (called my_db_name) as follows:
Open a bash console (not a virtualenv console!) and execute the following commands:
dropdb -h xxx.postgres.eu.pythonanywhere-services.com -p 10077 -U super my_db_name
createdb -h xxx.postgres.eu.pythonanywhere-services.com -p 10077 -U super my_db_name
(replace above xxx
with your data)