Django — Python framework for database driven sites.
Posted 9 months, 1 week ago at 9:00 pm. 0 comments
I have been really busy the last few days with server switching, other projects, and…. Django? Django is a Python web framework I have been learning about. I have never coded python in my life, and Django was still easy to use while learning python simultaneously. Django is particularly useful for database powered sites.
Basically it is a 3 step process to making a Django app.
- 1. Create the database structure in models.py
- 2. Select the data to be sent to the templating system for each page in views.py
- 3. Make the HTML templates and insert tags for each variable
Theres more to it than that, but thats the jist of it. It makes programing websites a lot easier and not to mention faster than php or ruby. Django for example can automatically make an administrative page for the site based on the database fields you specified in the models.py for each app.
Django is also highly plug-able. You can drop someone elses app into your own project (which is pretty much a package of apps making up a site) and integrate it in. Although Django is a little harder for the average joe to set up than say, just sticking to PHP, it is worth it. As a note, for production sites, it is recommended to keep media and python on diferent servers. This makes it hard to use Django on a shared server not only because most shared servers don’t provide it, but because it is recomended to keep the Django on an apache server running mod_python and the media (images, js, css) on a server such as nginx or lighttpd.
If you are interested in making a database driven site and are comfortable messing around with python, Django is definitely worth a shot.
