Content
Documentation
First steps
- On Pythonanywhere
- From a fresh start with no apps, go into account -> token and create one.
- Open a console and execute
pip install --user pythonanywhere
thenpa_autoconfigure_django.py --python=3.8 https://github.com/<GithubUser>/<repo>.git
- In Web Tab
- Create a new web app with a custom installation (not Django)
- Copy the CNAME and paste it where you want it on your registrar
- Set the source code directory
- Put this in the wsgi file
Python | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
-
venv
- Install dependencies and make sure the correct venv is used
- In a new console type
pip install -r requirements.txt
- In the web tab click on the virtual env box and enter the whole path to the virtualenv
- If there is npm stuff to install, do it
- Execute all the common django commands (makemigrations, migrate, etc)
-
Static and media files
- In Web tab set the wanted path to both
-
I probably forgot something lmao