20131211 (Wednesday, 11 December 2013)¶
Updated the Online demo sites because the bug which I fixed yesterday was still active there.
Django’s LANGUAGES
setting¶
I realized that LANGUAGES
still contains all Django
languages even on sites who have languages
set. The
expected behaviour is to reduce this array to only those languages
which are actually being used. The bug was in north.north_site
,
where I did the conversion too late: modifying LANGUAGES
has no effect when settings have been loaded. Now it is fixed:
>>> from lino import startup
>>> startup('lino_book.projects.docs.settings.demo')
>>> from lino.api.doctest import *
>>> rmu(settings.LANGUAGES)
[('de', 'German'), ('en', 'English'), ('es', 'Spanish'), ('et', 'Estonian'), ('fr', 'French'), ('nl', 'Dutch'), ('pt-br', 'Brazilian Portuguese')]
Converting use_extensible to plugin (continued)¶
Pooh! In a three-hours surgery session I made the setup_media_link thing pluggable.
In your settings.py file, if you had use_extensible set to True, then you must now replace:
class Site(Site):
extensible_base_url = "foo"
extensible_root = "bar"
SITE = Site(globals())
by:
class Site(Site):
...
SITE = Site(globals())
SITE.configure_plugin('extensible',
media_base_url="foo",
media_root="bar")
Documentation is still almost absent…
TODO: move specific chunks from linoweb.js to js_snippets