This post will explain how to setup automatic deployments to a Django Web-App hosted on PythonAnywhere.
What people normally do:
1. Everyone does ...
For further actions, you may consider blocking this person and/or reporting abuse
PythonAnywhere dev here -- thanks for the great how-to! Just a quick note, you should add an "import git" to the top of that views.py.
Thanks for pointing it out. Corrected it.
By the way as far as I know you work pythonanywhere right ? (I have seen your name on forums)
Yes, that's me :-) And thanks for adding the correction!
Thanks for the sharing. I followed the path until stumble across: git remote set-url origin git@github.com:USERNAME/REPOSITORY.git then I recieved constantly "
fatal: Not a git repository (or any parent up to mount point /home/donbonbon)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). I actually wasn't sure if I need to use my git repo or pythonanywhere, I ended up testing all.. Noting worked... can you kindly advise. PS - I also tried it on an empty project with the script your recommended... it gave a warning to work only with python 2.7. Any input would be highly appreciated.
I know its too late but adding it here for future readers
for some reason git@github.com:USERNAME/REPOSITORY.git doesn't work so instead do this
git remote set-url origin https://{token}@github.com/{username}/{project}.git
and here is steps to create access token for above url, as password access is not supported now
Hi there, thanks for the tutorial.
Question: does one still have to push the "Reload ..." button in the web tab in pythonanywhere manually after doing this? Or is this only for getting the code to pythonanywhere?
If it also solves the problem of manual reloading in the web tab, I will give it a go :).
Yeah, you have to. You can also use pythonanywhere API to do it.
Hi,
I'm receiving this error:
cmdline: git pull -v origin
stderr: 'fatal: Could not read from remote repository.
NO MATCH
Please make sure you have the correct access rights
and the repository exists
Please guide me
Awesome!
It's so much fun to learn something new.
Hi everyone,
I know this post has been made since, but I'm having same issues @tanuja01 raised and I can't seem to find anything that address this issue. Due to this the webhook setup on GitHub does not check as okay.
I really need help with this ASAP because my current project I'm working on depends on it.
To auto-reload the web app:
pythonanywhere.com/forums/topic/27...
Can a private GitHub repo be connected to pythonanywhere.
Yes you can
Thank you !
Spent the whole day setting it up. Thanks, I learnt new things while doing it.