background preloader

Django

Facebook Twitter

Markdown

Webframeworks. "Server startup" and its discontents. A fairly common question people ask on the Django mailing lists and in the IRC channel is “how do I have something run when the server starts up?” This is a somewhat tricky question to answer, because in many ways there’s no concept of “server start” in Django, and because the reasons behind the question vary from one use case to the next. So let’s take a look at just what people are wanting to do at “server start”, what that means (and, just as importantly, what it doesn’t mean) and how to handle it in a Django-based application. The protocol without a state Every so often someone will complain about frameworks like Django or Rails, alleging that they’re “just” light wrappers around HTTP (for example) and implying that this is a bug which needs to be fixed.

Personally, I think this overlooks the power of HTTP, and that staying close to the nature of the underlying protocol is really a strength. But it does require a different way of thinking about things. stateless Use cases Expensive data. Python-twitter - Google Code. GitHub is now the "source of truth" but I will always try to update to this project page.

A Python wrapper around the Twitter API Author: The Python-Twitter Developers <python-twitter@googlegroups.com> Introduction This library provides a pure Python interface for the Twitter API. Twitter ( provides a service that allows people to connect via the web, IM, and SMS. Twitter exposes a web services API ( and this library is intended to make it even easier for Python programmers to use. Building From source: Install the dependencies: Download the latest python-twitter library from: Extract the source distribution and run: $ python setup.py build $ python setup.py install Testing With setuptools installed: $ python setup.py test Without setuptools installed: Using. Django-basic-apps - Google Code. Multiple Templates in Django. Exclusive offer: get 50% off this eBook here Django 1.0 Template Development — Save 50% A practical guide to Django template development with custom tags, filters, multiple templates, caching, and more by Scott Newman | December 2008 | Web Development There are times when we will need to serve the same content in multiple ways whether it's displaying a printable version of a page, creating festive themes for holidays or promotions, or using a different set of templates for mobile devices.

There are a number of approaches to these tasks, and no one is "right". Consider the different approaches to tailoring outputExplore the challenges of serving content to mobile devicesCreate printer-friendly output via URL parameters Though there are different approaches that can be taken to serve content in multiple formats, the best solution will be specific to your circumstances and implementation. Almost any approach you take will have maintenance overhead. Serving mobile devices Adapting content. Django | The Web framework for perfectionists with deadlines.

Adding Your Twitter Status to a Django Site.