brutasse / django-cbv Goto Github PK
View Code? Open in Web Editor NEWClass Based Views backported from Django trunk
Home Page: https://docs.djangoproject.com/en/dev/topics/class-based-views/
License: Other
Class Based Views backported from Django trunk
Home Page: https://docs.djangoproject.com/en/dev/topics/class-based-views/
License: Other
From @Kooludo on sorl/django-cbv:
Hi there. I'm getting an error "TypeError: can't pickle function objects" when I attempt to use django-cbv with Django's per site caching middleware (django.middleware.cache.FetchFromCacheMiddleware and django.middleware.cache.UpdateCacheMiddleware).
In my case it seems like it's failing on attempting to pickle an object of type cbv.http.TemplateResponse. I've tried with memcache and locmem backends.
Is this a known issue. Are there any workarounds?
Traceback (most recent call last):
File "/home/ludo/.virtualenvs/myproject-env/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 280, in run
self.result = application(self.environ, self.start_response)
File "/home/ludo/.virtualenvs/myproject-env/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 674, in __call__
return self.application(environ, start_response)
File "/home/ludo/.virtualenvs/myproject-env/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 252, in __call__
response = middleware_method(request, response)
File "/home/ludo/.virtualenvs/myproject-env/lib/python2.6/site-packages/django/middleware/cache.py", line 105, in process_response
cache.set(cache_key, response, timeout)
File "/home/ludo/.virtualenvs/myproject-env/lib/python2.6/site-packages/django/core/cache/backends/locmem.py", line 86, in set
self._set(key, pickle.dumps(value), timeout)
File "/home/ludo/.virtualenvs/myproject-env/lib/python2.6/copy_reg.py", line 70, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle function objects
It's happening with two different apps using cbv generic views. It's unable to pickle an object of type cbv.http.TemplateResponse.
I'm also using Django-CMS, so wonder if that could be messing with something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.