3 ms·
I love Django for its docs and sensible defaults to just about everything. I've been reading the Light Weight Django book, now nearing completion at O'Reilly, a
by jarpineh 12y ago
I love Django for its docs and sensible defaults to just about everything. I've been reading the Light Weight Django book, now nearing completion at O'Reilly, and Django can be used as lightly as Express. I'd link to source example, but I can't find the code anywhere and the ebook is not on this device...
I don't know if it's lighter than regular Django in terms of speed, but by the measure of how much you need to code you can't do much better. Couple of pain points are declaring settings for middleware and template processors, even when you don't really need them, but other than that it is really basic. This is your URL pattern, this is your view function to call when a request comes for such URL. From there you can do what you want with the request, as long as you convert your response to Django's HttpResponse object (which takes a string).
For something a bit different, I recommend taking a look into Morepath: http://morepath.readthedocs.org/en/latest/ http://morepath.readthedocs.org/en/latest/
It looks to have some genuine useful parts from Zope, rethought for today's more RESTful, Javascripted world. My next personal project will probably use it as a base.