PyLucid v1.3.0 changes...

how to update

Use our Update CLI script and update:

  • first run:
    • PyLucid
  • second run:
    • django-tools
    • django-reversion
    • django-compressor

Maybe your templates must be changed, if you have used debug in it, e.g.:

1
2
- DjangoTag0Assembly
+ DjangoTag1Assembly

CACHES

You can leave your old CACHES settings untouched. But it's a good idea to use the new "smooth cache backends", because:

  • The default PyLucid settings used the SmoothLocMemCache backend. But this isn't very memory-efficient.
  • You can use the normal django cache backends. But PyLucid clears the cache with cache.clear() completely after e.g. a page was edited. This isn't effective with the normal backends.

Example settings can look like:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CACHE_MIDDLEWARE_SECONDS = 3600 # 1h

_BACKEND = "django_tools.cache.smooth_cache_backends.FileBasedCache"
_LOCATION_PREFIX = "/var/tmp/PyLucid_"
CACHES = {
    'default': {
        'BACKEND': _BACKEND,
        'LOCATION': _LOCATION_PREFIX + 'default-cache',
        'TIMEOUT': CACHE_MIDDLEWARE_SECONDS,
    },
    'dbtemplates': {
        # http://django-dbtemplates.readthedocs.org/en/latest/advanced/#caching
        'BACKEND': _BACKEND,
        'LOCATION': _LOCATION_PREFIX + 'dbtemplates-cache',
        'TIMEOUT': CACHE_MIDDLEWARE_SECONDS,
    },
    LOCAL_SYNC_CACHE_BACKEND: {
        # https://github.com/jedie/django-tools/blob/master/django_tools/local_sync_cache/local_sync_cache.py
        'BACKEND': _BACKEND,
        'LOCATION': _LOCATION_PREFIX + 'local_sync-cache',
        'TIMEOUT': CACHE_MIDDLEWARE_SECONDS,
    },
}

Note:

Please read the updated informations!

changes

visible changes

Bugfixes

internals

filemanager

middlewares

We used a new middleware from django-tools to set request.debug like:

1
request.debug = settings.DEBUG or request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS

Note that this is a OR contraint and not a AND !

We also remove "debug" from context processors. Because django.core.context_processors.request is used and so you can access it via request.debug...

update external packages:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# http://pypi.python.org/pypi/django-tools
-django-tools>=0.24,<0.25
+django-tools>=0.24.10,<0.25

 # https://github.com/etianen/django-reversion
 # http://pypi.python.org/pypi/django-reversion
-django-reversion>=1.6,<1.7
+django-reversion>=1.6.2,<1.7

 # https://github.com/jezdez/django_compressor
 # http://pypi.python.org/pypi/django_compressor/
-django_compressor==dev
+django_compressor>=1.2,<1.3