Forums

Should I start learning with Python Anywhere?

I'm just starting Django after having just completed my first very useful and functional python program for work (saved me $50k+ per year in data management labour!!). I've seen the light and want to get good at Django by building a web app for my company. I guess I'm pretty lucky to have a very desirable project goal just starting out. Question is, do I start learning in a deployed environment like PA or do I start locally? I did the Django tutorial locally so I have a bit of an idea how things are working. I'm worried that I'll start PA deployment and there be too much I don't know and get frustrated.

Personally I prefer developing and testing locally, then I push my project to GitHub, pull it on PythonAnywhere and reload my webapp with the new code. But it really is a personal preference

There are two main reasons I prefer it this way:

  1. I can use my own IDE with autocomplete, a theme I like and my preference of syntax highlighting.

  2. For testing, I find it much easier to debug errors using the Django development server. I know that PA has the error log but you have to navigate to it and reload it each time to get the new information etc... Whereas in the Django development console the error is printed right there and I can see it immediately.

If you don't have GitHub (or similar) I'd strongly recommend you use it, again for 2 reasons.

  1. VERSION CONTROL!!! I cannot stress the importance of version control strongly enough....

  2. It's much easier on PA just to do a git pull from a PA console than it is to manually upload every individual file that you changed.

Good luck learning Django!!

Great advice there, and let me add my own personal +1 for using version control -- coding without it is like trying to code with one hand tied behind your back. I can't count the number of times I've messed things up and then rescued myself by reverting stuff back to a working version. Git on its own provides that, and GitHub is just the icing on the cake :-)

Also, for the OP -- while it will undoubtedly be pretty basic for you given how far along the learning curve you are, the "Django Girls" tutorial is one for beginner programmers that, crucially, has an excellent section on deploying a local app to PythonAnywhere using GitHub, so it might be worth running through it for that bit, even if the rest is covering stuff that you already understand fully.