Comments (6)
That would be my guess, but I suspect that the caching strategy employed here (assuming one value for one key) could pose a problem.
I considered whether keys should allow template formatting, this would allow the request language to be passed for the key. Might still do this, but another way of doing this would be to render a template variable for the key, using the request language, and pass that (either from the view, a context processor, or even a template tag of your own devising).
from django-addendum.
From my experience the easiest way to avoid caching is using lambdas... Anyway I am gonna try to implement this in about a month...
from django-addendum.
Can you explain what you mean about using lambdas to avoid caching?
from django-addendum.
Well consider this example:
'items': Model.objects.filter(),
versus
'items': lambda: Model.objects.filter(),
the second one does not get cached, not sure it is the best way but it worked. . Or something like https://docs.djangoproject.com/en/dev/topics/cache/#template-fragment-caching
from django-addendum.
would be awesome if we can integrate translations with this!
from django-addendum.
This is now available in 0.3.0. See the docs for how to use this.
from django-addendum.
Related Issues (6)
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-addendum.