Skip to content

- Add caveat about automatic changes to settings.py and git conflict#1640

Closed
kjcole wants to merge 2 commits intoDjangoGirls:masterfrom
kjcole:master
Closed

- Add caveat about automatic changes to settings.py and git conflict#1640
kjcole wants to merge 2 commits intoDjangoGirls:masterfrom
kjcole:master

Conversation

@kjcole
Copy link
Copy Markdown

@kjcole kjcole commented Feb 8, 2020

Because I missed the leading "." before "pythonanywhere.com" in settings.py my ALLOWED_HOSTS read:

ALLOWED_HOSTS = ["127.0.0.1", "pythonanywhere.com"]

This meant that the testing on the local development machine worked, but the deployed copy did not. I quickly realized the mistake, but since pa_autoconfigure_django.py had changed the "production" copy of settings.py, it was out of sync with the both my development machine and the hosted git repository.

Missing the leading "." seems like a potentially common mistake. So maybe that's where the tutorial should change, calling people's attention to that, instead.

@das-g
Copy link
Copy Markdown
Member

das-g commented Jul 12, 2020

@hjwp Should pa_autoconfigure_django.py make modifications to settings.py? Can this be avoided somehow?

@hjwp
Copy link
Copy Markdown
Contributor

hjwp commented Jul 30, 2020

@hjwp Should pa_autoconfigure_django.py make modifications to settings.py? Can this be avoided somehow?

I'm not at PA any more, but you could open an issue at https://github.com/pythonanywhere/helper_scripts/issues/ ?

@das-g
Copy link
Copy Markdown
Member

das-g commented Jul 30, 2020

you could open an issue at https://github.com/pythonanywhere/helper_scripts/issues/

I've now filed pythonanywhere/helper_scripts#27

@das-g
Copy link
Copy Markdown
Member

das-g commented Feb 19, 2021

According to pythonanywhere/helper_scripts#27 (comment), the PythonAnywhere's pa_autoconfigure_django.py was adapted, to not modify settings.py unless necessary, and with the settings.py content created in this tutorial such modification should indeed not be necessary, so no automatic modification should occur anymore.

Can we close this thus without merging? Or should we add instructions on how to make sure that indeed no modification occurred? (E.g. git diff or git status on PythonAnywhere) If the latter, what should those instructions recommend in case a modification did occur anyway? Commit on PythonAnywhere and push to GitHub and then pull it to the local repo?

@fltfx fltfx closed this Oct 11, 2024
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

Successfully merging this pull request may close these issues.

4 participants