Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kjcole
Copy link

@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
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
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
Member

das-g commented Jul 30, 2020

@das-g
Copy link
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?

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.

None yet

3 participants