django-middleware
Preserving the state of show/hide sections in Django with jQuery/Javascript
I have a form with some show/hide sections. When I press some buttons in my home form, different forms will be shown. After I edit the information in those forms I\'m returning to the first form. But[详细]
2023-01-31 06:02 分类:问答Django: retrieve session or cookies in middleware
can i get the current session or cookie inside a middleware? I tried but I got: \'WSGIRequest\' 开发者_运维问答object has no attribute \'session\'[详细]
2023-01-26 14:54 分类:问答Testing django pages with middleware for multihost
Background: I\'m using the middleware django-multihost (http://effbot.org/zone/django-multihost.htm) to allow my single django app to respond to different hostnames from the same project.The middlewar[详细]
2023-01-24 10:13 分类:问答Django: Error: ImproperlyConfigured Module does not define a " " class
ImproperlyConfigured: Middlew开发者_运维百科are module \"report\" does not define a \"ReportMiddleware\" class[详细]
2023-01-22 17:25 分类:问答How Do Search Engines See A Localized Django Site?
I have a Django site that uses the localization mi开发者_运维知识库ddleware in combination with gettext and the trans/blocktrans template tags to show visitors different pages depending on the preferr[详细]
2023-01-20 21:04 分类:问答Excluding a Django app from being localized using a middleware
I need to localize a django project, but keep one of the applications (the blog) English only. I wrote this middleware in order to achieve this:[详细]
2023-01-18 23:23 分类:问答django middleware redirect infinite loop
I have a middleware that checks a session value and redirects depending that value.My problem is, it is creating an infinite redirect loop and I\'m not sure why.[详细]
2023-01-14 02:52 分类:问答Safe to modify settings.SITE_ID from middleware in Django?
I have modified the multihost.py middleware I found at http://effbot.org/zone/django-multihost.htm to set the settings.SITE_ID dynamically, but have some concerns that I may have just left the reserva[详细]
2023-01-11 00:21 分类:问答AttributeError: 'WSGIRequest' object has no attribute 'session'
I keep getting this error at random times and whenever I touch the django.wsgi file, it gets fixed only to happen again after a few hours. I\'m lost as to what to do. my middleware_classes is as follo[详细]
2023-01-07 20:05 分类:问答How do I do a Rails style before_filter with Google App Engine?
The app is setup as a basic WSGI application. I\'m just trying to call a function before the requestHa开发者_如何学编程ndler is run.[详细]
2023-01-06 23:32 分类:问答