I have been implementing few ideas in Django for past month or so but as exciting it might be to see your code working wonders on localhost, you really want to see it running live. Over last week, I explored various hosting options for Django and after reading a ton of posts and talking to few people, I picked Heroku. I also contemplated paying someone for it but I thought that investing a week in learning this is much more valuable and reusable than if I have to find and hire someone, explain my requirements (do it for every new project) and following up to make sure they are doing it right. Basically, it had come down to these 3 options-
- Webfaction – the de facto standard for a lot of python developers. It has good tutorials and seemed like the most straightforward guided hosting option.
- Linode – I talked to a friend who does professional django consulting and development and this is what he uses. But I figured that linode is more suited for professionals who know exactly how they want to setup their environment. Linode gives you most freedom if you know what you want but it can be overwhelming for novices. You are paying and you have to work.
- Heroku – the newcomer and the revered choice for rails application has finally embraced django. Heroku takes away all your hassles of configuring a prod environment and makes the deployment as easy as humanly possible. You are paying so that you work least. It does not mean it was all magical, you still need to understand what a good environment is and what are good prod practices. But I figured you need to learn those with any platform anyways, so why not invest some time in learning this growing service once and for all. It is probably very straightforward to people who have done it before (and I read a lot of pros switching to Heroku) but I spent 2 days figuring out minute details which even got frustrating at some points. But, in the end, I have a minimum working prototype up on web and I am loving it.
If I had to summarize past few weeks, it would be like this:
Get fairly comfortable with Django and already tried out few tutorials.
Learn the importance of good URLs.
How to start with minimal features and structure (urls) and fill out views later.
Always reuse opensource libraries – userena, imagekit etc.
Working with images can be a pain – getting PIL to work with jpeg was a nightmare but essential.
Understand the meaning and difference between static and media URLs (it took me unbelievably long time).
You are lucky to be developing in post twitter-bootstrap era. CSS will never have to be ugly now and anyone can design a professional looking web app.
Beauty of django ORM is that I can use mysql in dev and postgresql freely supported on heroku (use south for migrations).
Git is godsend, learn it asap.
Heroku needs virtualenv, so learn it.
Deploying my toy app on heroku cost me $0 so far (its non-persistent and slow but I don’t care right now). I can keep iterating and getting feedback from friends while adding those few missing components needed to launch the project live.
Internet has all the answers, just be persistent and think what is the right question.
The bottom line is learn whatever it takes to go live!
Anyways, here is my toy prototype live - http://smartbride.herokuapp.com/ (the picture links get broken in sometime due to non-persistence)
The fun has just begun, more updates soon.