summaryrefslogtreecommitdiffstats
path: root/main/middleware.py
AgeCommit message (Collapse)AuthorFilesLines
2010-06-21Remove AutoUserMiddlewareDan McGee1-16/+0
This was having some serious effects on caching as we would always have to access the user in the session, marking every page with a "Vary: Cookie" header. This is the start of stamping that out. The way we get the user for news item creation is now more similar to that from the todo lists, but not quite. That should be adjusted to be more like the news item creation. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Add a hacked version of Django UpdateCacheMiddlewareDan McGee1-0/+52
This is to address a rather large issue with caching of feed objects in Django. Because they are built up using an XML library that does multiple writes on a file-like object, a single feed object, even when pulled from memcached, generates 1582 writes to the open socket rather than the optimal one it could do. Some version of this fix will be making it upstream, but I need to figure out how to approach that before I do so and for now this will address one of our larger performance issues on the live site since the packages feed is hit as often as it is. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-09Fix the get_user middleware stuffDan McGee1-35/+1
First off, the copyright notice is from the other middleware previously removed, so all of that can go, along with some stragglers in the import list. Next, as stated on http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser, you need to be sure to have the import in the model class be the same as the import used in the middleware declaration, which was not true. Whoops. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-10removed RequireLoginMiddlewareIsmael Carnales1-19/+0
2008-10-12separate copyrighted middleware from my additionsDusty Phillips1-0/+2
2008-10-06use an autouser middleware to set the creator of an objectDusty Phillips1-0/+15
2008-04-10Added/changed full site login middleware.eliott1-0/+52