[TriZPUG] Wanted: Biased Opinions: Django or Pyramid (Pylons/BFG)?

Paul McLanahan pmclanahan at gmail.com
Tue Mar 29 16:48:24 CEST 2011


Hi Josh,

I would (and did) definitely go with Django. It's really all about the
docs. Their documentation is outstanding, so anything you might want
or need to know about the framework is in the docs and is easy to read
and understand. If you want to do something strange, it's almost
guaranteed that there's already an opensource app out there to handle
what you want, or at the very least a blog post explaining the
technique. I've found that all of this material not only helps you get
going quickly, but it continues supporting you through the end of a
project as well.

I also love how Django is just Python. Granted, I've never used
repose.bfg, Pylons, or Pyramid, but that's mainly because I started
with Django and haven't felt the need to shop. If I need custom
methods on my model or queryset instances, I just subclass. If I need
to extend the template system, I write a simple function and register
it. It just provides all the tools you'll need, and easy and well
thought-out ways of extending them to be exactly what you need. This
is especially true of many of the new and reworked features in the
freshly released 1.3.

The other thing that I believe has propelled Django to being one of
the most popular web frameworks in any language is its extensibility.
It has the concept of reusable apps. An "app" can have it's own urls,
models, views, templates, static media, admin definitions, etc.. There
are thousands of these out there for your use and more being released
all the time. Some of the more popular ones enable popular
registration patterns, private betas, an amazing debugging toolbar,
background async task queuing, content pagination, etc., etc.. These
are really all just python packages and the only requirement is that
they exist on your python path. You then add the package namespace to
a tuple in your settings.py, and you're good to go. The well made ones
are all highly customizable w/o a need to modify their code, and are
easy to seamlessly integrate into your site.

You can also easily build your own library of apps for use on future
projects. Just keep them around and you'll be following DRY (Don't
Repeat Yourself) across projects, and not just in a single codebase.

I'm sure that others on this list can more eloquently explain all of
the advantages of Django. I'll just say that I've loved using it since
I started almost 4 years ago. I have tried a number of other
frameworks and languages (PHP, Ruby, Perl) before finding Django and
Python, but none of them has fit my brain so well as this. It helps me
with the drudgery of stuff I need but don't want to do for every
project, but gets out of my way to let me do the things that make my
site different. The skillful balancing of that aspect, plus the
massive, helpful, and engaged community has led me to believe that
Django is the best tool for a very wide range of web app jobs. It's
certainly not good at everything, but as far as a framework can be
truly general-purpose, I believe Django is the best.

Plus, I'm pretty sure Pyramid was made by aliens. I mean; look at
their crazy 80s hair metal concert shirt ;)

Good luck,

Paul McLanahan


More information about the TriZPUG mailing list