Comments (7)
A cookie is only set when you force a flavour. In which situation do you expect a cookie to be set, can you post the actual response headers that should set the cookie but didn't?
from django-mobile.
I would like to store the flavour at user's browser,then detemine initial page size of api results.
from django-mobile.
Like I said, the cookie will be set the first time when the ?flavour=...
GET parameter is used.
You can read the currently active flavour with django_mobile.get_flavour
from django-mobile.
oh,I just thought it will be set when detected the flavour,if I use get_flavour multi-time,It may becoming inefficient
from django-mobile.
Why would you think that, the implementation is really simple: https://github.com/gregmuellegger/django-mobile/blob/master/django_mobile/__init__.py#L78
from django-mobile.
looks really simple! If I set the store_backend to cookie,and ?flavour=... not presented ,it will looks into request object then _local variable which stores flavour in threading.local(),thank god,First time heard of threading.local(),Thank your for answerd my question.
from django-mobile.
:) Have fun using it.
from django-mobile.
Related Issues (20)
- self.request.flavour not work in view
- Ubuntu doesn't like the "ΓΌ" in __init__.py HOT 6
- No option to provide empty exceptions HOT 1
- CachedLoader is broken on Django 1.7 HOT 4
- Withdrawn
- CachedLoader broken in Django 1.8 HOT 14
- Template name for Class Based View. HOT 1
- cause a 500 error when set DEBUG=True
- Skip mobile detection after flavour is saved permanently HOT 3
- Adding smart watch flavour ? HOT 4
- Got 'django.template.loader_tags.ExtendsError' when customizing admin interface in Django 1.9 HOT 2
- Over time, more desktops are detecting as "mobile"... HOT 6
- iPad not detected as mobile HOT 2
- Django 1.10 incompatibility HOT 7
- CachedLoader breaks application HOT 4
- Django 1.10 support HOT 1
- How to disable mobile detection
- Is still alive the project? HOT 4
- Django mobile
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-mobile.