I’ve decided to give a bit of rest to my relentless onslaught of projects towards Hype Machine (somewhat at the request/annoyance of Anthony Volodkin). As always, I like to pick projects where I have
completely almost zero experience with and use it as a good chance to learn something new and possibly have fun.
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
I have yet to figure out what I would like to do with the Django application I’d like to develop. Thoughts that I were tossing around were perhaps working with an additional site/SDK such as Facebook’s, Soundcloud’s etc… to try and deliver some neat functionality. If you have any suggestions, throw them my way.
My choice to use Django was pretty easy. I love python and hate ruby.
For some crazy reason, I decided to learn how to deploy Django on my shared hosted server Bluehost.com first before actually learning Django (don’t get me started on my annoyance with using a shared server now).
I have my main domain address ‘www.fzakaria.com’ pointed to my WordPress blog. I wanted to achieve in having Django installed as a sub directory/url of the domain (rather than a subdomain). i.e. ‘www.fzakaria.com/django/<myapp>’
There was plenty of resources available (shockingly even on the Bluehost FAQ) which helped me setup the server appropriately however I ran into a lot of GOTCHAS just because I didn’t know what I was doing.
- Python doesn’t recursively search through the PYTHONPATH if the directory is created as a module. (i.e. needs an __init__.py file in the directory). This caused a headache and me having to add a lot of additions to the PYTHONPATH before I realized it.
- Each directory under your public_html folder should have it’s own .htaccess file. I mistakingly was trying to couple the .htaccess file for the main domain which handled my WordPress blog and the one that would start the fcgi script to launch Django.
- Deploying to your server should really be the last step of creating a Django application, especially on a shared server. Since it’s a shared server I haven’t figured out a way to cause Django to refresh the server when I make modifications to any of the MVC python files for my application.