Pylons or Django?


I am trying to decide whether to use Pylons or Django. Both are frameworks for building Python web applications, but with opposing philosophies.

Django tries to be everything. It comes with its own ORM, its own template engine, its own everything. That gives you a nice developing experience because everything fits together and because very nice applications can be built on top of all those components, like the admin tool, which is amazing.

On the other hand, if you don’t like one component, you can’t just remove it and put another one in its place. Maybe you can, but it is most likely that it won’t go very smooth. All these issues apply equally to Rails.

Pylons doesn’t try to do anything else than the basics, and leaves the rest to external libraries. External libraries that you pick, and switch if you feel like it. This is closer to real-, I mean, non-web-application development where you generally don’t use frameworks. It sounds good, but as soon as you start using Pylons, you see that it seems like a bunch of different stuff badly glued together. The whole experience ends up not being as pleasant although it is, I’d say, more professional (you are picking the tools you think are right, not whatever that was already there).

But there’s more. If you develop an application in the Pylons way, you can reuse parts of it without depending on the web framework. You use the database models in a desktop application and you only depend on SQLAlchemy (or whatever ORM you picked). You don’t end up with a desktop application that depends on a web framework, which doesn’t makes sense. This may be important or most likely, not.

It would be nice if something like Django was built on top of Pylons. That would be something like, if you use Elixir and you have this or that template engine, you get a nice administration tool, if you don’t, you don’t get it. But you still can pick your philosophy without changing basic parts, like the way you write the configuration file. Given infinite time this facts should reach the conclusion that Pylons is the right choice, but the Django’s admin tool is so sexy!

3 responses to “Pylons or Django?”

  1. Lyndsy SImon Avatar

    I understand where you’re coming from, but I have to disagree with your statement that “Django tries to be everything,” as I find the exact opposite to be the case.

    Django is amazing for what it does, and that is help you quickly develop dynamic websites. If I have a new project, and it fits within the scope of Django’s mission, I’ll use Django every time. If I’m bolting on functionality to an existing site, the Django probably isn’t the right choice. Likewise, if I’m using data from several sources, or trying to share a DB with another app, I’m not likely to go with Django.

    I’ve not used Pylons, as my first experience with Python was Django, but I’m surely looking for something more generic. As it stands, if a site doesn’t fit the mold, I’m falling back to PHP (CodeIgniter). I like Python very much, though, and I will soon get around to deciding on a more all-purpose framework. That could be Pylons, it could be TurboGears, Zope… Who knows? No matter what I chose, though, Django will still be my “go-to” tool for rapid development.

  2. Ben Bangert Avatar

    Have you looked at TurboGears2? It has an admin interface, and is built on top of Pylons. There’s also Rum, which provides a db admin UI for SQLAlchemy models, FormAlchemy also quickly turns SA models into an admin tool, and there’s Sprox which is used under the hood for TG2’s admin (which should work with fairly vanilla Pylons apps soon I believe).

  3. Mark van Deursen Avatar

    We made a decision to go for Django. It’s wildly accepted, very well documented and it behaves very intuitive.

    An other great advantage is the JQuery integration. (well it’s easy to be done!)

    But that is only our conclusion for now. Is there someone who can change our minds?

Leave a Reply

You may also like:

If you want to work with me or hire me? Contact me

You can follow me or connect with me:

Or get new content delivered directly to your inbox.

Join 5,043 other subscribers

I wrote a book:

Stack of copies of How to Hire and Manage Remote Teams

How to Hire and Manage Remote Teams, where I distill all the techniques I've been using to build and manage distributed teams for the past 10 years.

I write about:

announcement blogging book book review book reviews books building Sano Business C# Clojure ClojureScript Common Lisp database Debian Esperanto Git ham radio history idea Java Kubuntu Lisp management Non-Fiction OpenID programming Python Radio Society of Great Britain Rails rant re-frame release Ruby Ruby on Rails Sano science science fiction security self-help Star Trek technology Ubuntu web Windows WordPress

I've been writing for a while:


%d bloggers like this: