-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
When I went through the tutorial on the Deploy! step I noticed that the following diff was added to settings.py
after running pa_autoconfigure_django.py
+
+MEDIA_URL = '/media/'
+MEDIA_ROOT = Path(BASE_DIR / 'media')
This change isn't conflicting with any changes later in the tutorial so when I did git pull
later everything just worked. If you never run git status
in the PythonAnywhere console you might even not notice it is there.
However this change might cause problems for someone who want to change settings.py
later. And I don't know what is the best way to address this unclean state of git so I can't come up with a pull request that would solve this issue. Possible solutions I see
- Add
MEDIA_URL
andMEDIA_ROOT
to the initialsettings.py
so that the script wouldn't need to add them (but why would we add the settings we don't need?) - Suggest running
git checkout -- .
afterpa_autoconfigure_django.py
and then suggesting an option to add theMEDIA_URL
andMEDIA_ROOT
lines back through the flow "my machine -> GitHub -> pythonanywhere" - Setting up pushing ability from pythonanywhere and commiting the change through the pythonanywhere console and pushing it to GitHub. One way to do it would be creating an ssh "deploy key" for the repository and adding it to pythonanywhere. Adding an ssh key to pythonanywhere is super easy. Could be a great practice if we switch to ssh auth to GitHub from the local machines, too.
Metadata
Metadata
Assignees
Labels
No labels