suor / django-pickling Goto Github PK
View Code? Open in Web Editor NEWEfficient pickling for django models
License: BSD 3-Clause "New" or "Revised" License
Efficient pickling for django models
License: BSD 3-Clause "New" or "Revised" License
with django 1.6/1.7 maintained?
Hi
Wouldn't it be better to mark _cache as a global var instead of relying on the default to be shared between function invocations?
Hi,
I tried installing django-pickling
on my Django 1.6 setup (Python 2.7.9), following the advise in cacheops
performance tips.
Adding it to INSTALLED_APPS
results in this stacktrace:
10:55:44 web.1 | Traceback (most recent call last):
10:55:44 web.1 | File "/usr/lib64/python2.7/wsgiref/handlers.py", line 85, in run
10:55:44 web.1 | self.result = application(self.environ, self.start_response)
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
10:55:44 web.1 | return self.application(environ, start_response)
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 187, in __call__
10:55:44 web.1 | self.load_middleware()
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware
10:55:44 web.1 | mw_instance = mw_class()
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/middleware/locale.py", line 24, in __init__
10:55:44 web.1 | for url_pattern in get_resolver(None).url_patterns:
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/core/urlresolvers.py", line 365, in url_patterns
10:55:44 web.1 | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/core/urlresolvers.py", line 360, in urlconf_module
10:55:44 web.1 | self._urlconf_module = import_module(self.urlconf_name)
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
10:55:44 web.1 | __import__(name)
10:55:44 web.1 | File "/home/olive/sources/1flow/oneflow/urls.py", line 66, in <module>
10:55:44 web.1 | url(r'^djangojs/', include('djangojs.urls')),
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 26, in include
10:55:44 web.1 | urlconf_module = import_module(urlconf_module)
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
10:55:44 web.1 | __import__(name)
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/src/django.js/djangojs/urls.py", line 36, in <module>
10:55:44 web.1 | url(r'^translation$', 'django.views.i18n.javascript_catalog', js_info_dict(), name='js_catalog'),
10:55:44 web.1 | File "/home/olive/.virtualenvs/1flow/src/django.js/djangojs/urls.py", line 25, in js_info_dict
10:55:44 web.1 | for path in module.__path__:
10:55:44 web.1 | AttributeError: 'module' object has no attribute '__path__'
10:55:44 web.1 | [06/Feb/2015 10:55:44] "GET / HTTP/1.1" 500 59
Removing it from INSTALLED_APPS
solves the crash so I assume it comes from this package, but I don't have a detailled stacktrace for this crash.
Looking at available stacktraces, I found this one that could imply an interaction problem with django-position
and is probably different than the current one which just prevents the webserver from handling any request.
The whole setup — and other interacting apps — is quite complex, but it's here if you dare looking at it ;-)
Do you have any hint of what could be causing this strange problem ?
Thanks & best regards,
Does not work with Django 1.10
File "..../virtualenv/lib/python3.5/site-packages/django_pickling.py", line 26, in Model__reduce__
if self._deferred:
AttributeError: 'Event' object has no attribute '_deferred'
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.