About Django from the Pyramid Guy

A Talk presented by Chris McDonough
log in to bookmark.

Audience level





September 6th, 11:05 a.m. – 11:45 a.m.


An opinionated recounting of the features Django shares with the Pyramid web framework, and how the two frameworks differ, as well as a prescription for collaboration between the Django and Pyramid communities.


About Django from the Pyramid Guy

Who Am I

What is a Web Framework

Django Docs Do It Right

Django Views Do It Right

Django Forms Do It Right

Django Convenience vs. Explicitness

Django Extensibility Does It Right

Django Defaults Do It Right

Django Reality Does It Right

What is Pyramid

Pylons Project

Is Pyramid a Microframework?

Small Pyramid Program

from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response

def hello_world(request):
   return Response('Hello %(name)s!' % request.matchdict)

if __name__ == '__main__':
   config = Configurator()
   config.add_route('hello', '/hello/{name}')
   config.add_view(hello_world, route_name='hello')
   app = config.make_wsgi_app()
   server = make_server('', 8080, app)

Pyramid and Python 3

I'm No Genius

Pyramid Docs

Docs Pain

Pyramid Friends


Bindings Packages

A more generic package is specialized for convenient use under Pyramid via use of a bindings package.

Higher Level Frameworks

Packaging Is Like a Blast Shield

Django Avoids Setuptools

Django Avoids Setuptools (2)

Subclassing Is Convenient

Globals are Convenient

Module-Scope Work Is Convenient

From Django tutorial, at module scope:

from django.contrib import admin

Module-Scope Work Is Convenient (2)

Pluggable Apps / Reusable Apps

Rendering Is Meta-View

Unit Tests

Static Files


Collaboration (Low-Level)

Collaboration (High-Level)

Promoting Python