gregmuellegger / django-mobile

Detect mobile browsers and serve different template flavours to them.
http://pypi.python.org/pypi/django-mobile
BSD 3-Clause "New" or "Revised" License
560 stars 170 forks source link

self.request.flavour not work in view #46

Open BergSoft opened 10 years ago

BergSoft commented 10 years ago

I try in view: if self.request.flavour == "mobile":

print self.request.flavour olways 'full' in view and in template request.flavour == "mobile"

class SetFlavourMiddleware(object): def process_request(self, request): _init_flavour(request) # it's not initialise right print self.request.flavour olways 'full' in view