Posts Tagged ‘django’

Django – rapid development and you. Great on toast!

Saturday, March 7th, 2009

I’ve been coding python for over two years now. I’ve mostly used it for console back end applications. Talking to Postgresql or Sqlite. I love Python. Before Python I was doing pretty much the same tasks with Perl. I’m not going to go into the Python vs Perl thing now but I will say that Python is a much, much more friendly language to use.

I got into Django with the 1.0 release. Developing with Django is fast. Crazy Fast. The Django ORM makes dealing with the database an extremely pleasant experience. Looking for a post with the slug ‘hey-i-am-the-post-you-are-looking-for’? Its as simple as Model.objects.get(‘hey-i-am-the-post-you-are-looking-for’).

Django follows the DRY principle. Don’t Repeat Yourself. The thing that I miss the most when dealing with other web frameworks, like CakePHP is the lack of  get_absolute_url(). I love that there is just one place where you define the url structure to a type of object. Want to change all of the links to your posts from /posts/<slug> to /not-posts/<slug>? Easy, change the value of get_absolute_url() in the Posts model.

With Django you can go from an idea for a webapp to a fully functional site in an afternoon. Django’s ORM is great to use even if you are not going to be using Django to build a web site. If you have not, spend an afternoon with Django. Get cozy. Learn to love it.