コード例 #1
0
def send_database_ready(sender, **kwargs):
    raise Exception("20151203 send_database_ready")
    from django.conf import settings
    database_ready.send(settings.SITE)
コード例 #2
0
ファイル: djangotest.py プロジェクト: DarioGT/lino
 def setUp(self):
     super(DjangoManageTestCase, self).setUp()
     database_ready.send(self)
コード例 #3
0
ファイル: urls.py プロジェクト: 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:
コード例 #4
0
ファイル: urls.py プロジェクト: 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:
コード例 #5
0
ファイル: djangotest.py プロジェクト: DarioGT/lino
 def setUp(self):
     super(DjangoManageTestCase, self).setUp()
     database_ready.send(self)