Add mobile middleware useful for local b2g dev
This commit is contained in:
Родитель
482629f8a2
Коммит
f19b5ef006
|
@ -306,3 +306,10 @@ class HijackRedirectMiddleware(object):
|
|||
view = resolve(view_url)
|
||||
response = view.func(r, *view.args, **view.kwargs)
|
||||
return response
|
||||
|
||||
|
||||
class AlwaysMobile(object):
|
||||
"""Middleware for development that forces all responses into mobile mode."""
|
||||
|
||||
def process_request(self, request):
|
||||
request.MOBILE = True
|
||||
|
|
Загрузка…
Ссылка в новой задаче