Sphene Community Tools

Community

Copyright © 2007-2009 by Herbert Poul
You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools

Community

Community

The 'Community' application is the root concept of Sphene Community Tools - Itself does not have any (useful) views on it's own, it just defines a few utility methods and models.

All applications (ie. Board and Wiki) require this application and it's middleware.

1. Features

2. Requirements

It requires the following applications:

and the following middleware (these are actually the default in django)

and... template processors (also a django default):

3. Provided Middleware

It provides the following middleware:

They are further described in the following sections:

3.1. sphene.community.middleware.ThreadLocals

This is basically the same as: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser

It provides the request object, currently logged in user, request parameters, etc. in thread local variables which can be accessed by template filters, template tags, models, etc.

It should be one of the first middlewares.

3.2. sphene.community.middleware.GroupMiddleware

If there is a view argument called 'group' it is set by this GroupMiddleware. Either by looking into the arguments for 'groupName' and retrieving it from the database, or by using the ThreadLocals middleware.

3.3. sphene.community.middleware.MultiHostMiddleware

TODO describe me :(

3.4. sphene.community.middleware.LastModified

This middleware is responsible for setting cache related HTTP headers. If the request object has an attribute called 'sph_lastmodified' (containing either 'True' or a datetime object) it will set Last-Modified and other cache related http headers.

4. Provided Template Processors

4.1. sphene.community.context_processors.navigation

This template processor will put two variables into the template context:

Tags:

Last Modified: 2008-03-23 14:52:27 by Herbert Poul - [ Snip Changes ] [ Wiki History ]

1 Comments

Customize List
844
3
2012-07-30 14:47:32
1 Threads

Please login to create a new thread.



Powered by Sphene Community Tools