Esempio n. 1
0
def send_database_ready(sender, **kwargs):
    raise Exception("20151203 send_database_ready")
    from django.conf import settings
    database_ready.send(settings.SITE)
Esempio n. 2
0
 def setUp(self):
     super(DjangoManageTestCase, self).setUp()
     database_ready.send(self)
Esempio n. 3
0
File: urls.py Progetto: DarioGT/lino
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:
Esempio n. 4
0
File: urls.py Progetto: DarioGT/lino
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:
Esempio n. 5
0
 def setUp(self):
     super(DjangoManageTestCase, self).setUp()
     database_ready.send(self)