def send_database_ready(sender, **kwargs): raise Exception("20151203 send_database_ready") from django.conf import settings database_ready.send(settings.SITE)
def setUp(self): super(DjangoManageTestCase, self).setUp() database_ready.send(self)
from django.conf.urls import url, include from django.conf.urls.static import static from lino.core.signals import database_ready from lino.core.utils import is_devserver import lino lino.startup() # we must explicitly call django.setup() because when running under # mod_wsgi this is not done automatically as with runserver (or at # least it seems so) lino.site_startup() site = settings.SITE urlpatterns = [] database_ready.send(site) if site.site_prefix: prefix = site.site_prefix[1:] else: prefix = '' rx = '^' + prefix for p in site.installed_plugins: pat = p.get_patterns() prx = rx if p.url_prefix: prx += p.url_prefix + "/" if prx == '^': urlpatterns += pat else:
from django.conf.urls.static import static from lino.core.signals import database_ready from lino.core.utils import is_devserver import lino lino.startup() # we must explicitly call django.setup() because when running under # mod_wsgi this is not done automatically as with runserver (or at # least it seems so) lino.site_startup() site = settings.SITE urlpatterns = [] database_ready.send(site) if site.site_prefix: prefix = site.site_prefix[1:] else: prefix = "" rx = "^" + prefix for p in site.installed_plugins: pat = p.get_patterns() prx = rx if p.url_prefix: prx += p.url_prefix + "/" if prx == "^": urlpatterns += pat else: