openmicroscopy/openmicroscopy — pull request #1646 by knabar (2013-10-22 09:30:43+00:00)
Title: OmeroWeb Django upgrade from 1.3.1 to 1.5.4

## Changes for Django 1.5

* Define dummy cache as default cache

"omero.web.caches": ["CACHES", '{"default": {"BACKEND": "django.core.cache.backends.dummy.DummyCache"}}', json.loads],

* Replace

from django.core import template_loader

with

from django.template import loader as template_loader

* `direct_to_template` no longer exists

Replaced with TemplateView

from django.views.generic import TemplateView

urlpatterns = patterns('',
(r'^$', TemplateView.as_view(template_name="index.html")),
)

* `django.views.generic.simple.redirect_to` no longer exists

Replaced with

lambda request: redirect(…)

* URL patterns cannot start with `(?i)^` anymore. Replaced with `^(?i)`

* View names in `{% url %}` tags must be quoted now, i.e.

{% url "test" %}

* `ALLOWED_HOSTS` required in production

"omero.web.allowed_hosts": ["ALLOWED_HOSTS", '["*"]', json.loads],

* Development web server now runs in threaded mode; to keep running with single thread:

python omeroweb/manage.py runserver --nothreading 0.0.0.0:8000