Compare commits
2 commits
cf95aeff7a
...
066d273e10
| Author | SHA1 | Date | |
|---|---|---|---|
| 066d273e10 | |||
| cd8cd40626 |
3 changed files with 17 additions and 2 deletions
|
|
@ -1009,7 +1009,7 @@
|
||||||
{
|
{
|
||||||
"id": "tags",
|
"id": "tags",
|
||||||
"title": "Tags",
|
"title": "Tags",
|
||||||
"canAddAnnotations": {"member": true, "staff": true, "admin": true},
|
"canAddAnnotations": {"member": true, "firend": true, "staff": true, "admin": true},
|
||||||
"item": "Tag",
|
"item": "Tag",
|
||||||
"autocomplete": true,
|
"autocomplete": true,
|
||||||
"overlap": true,
|
"overlap": true,
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,7 @@ DATA_UPLOAD_MAX_MEMORY_SIZE = 32 * 1024 * 1024
|
||||||
#you can ignore things below this line
|
#you can ignore things below this line
|
||||||
#=========================================================================
|
#=========================================================================
|
||||||
LOCAL_APPS = []
|
LOCAL_APPS = []
|
||||||
|
LOCAL_URLPATTERNS = []
|
||||||
#load installation specific settings from local_settings.py
|
#load installation specific settings from local_settings.py
|
||||||
try:
|
try:
|
||||||
from local_settings import *
|
from local_settings import *
|
||||||
|
|
@ -304,4 +305,3 @@ except NameError:
|
||||||
|
|
||||||
INSTALLED_APPS = tuple(list(INSTALLED_APPS) + LOCAL_APPS)
|
INSTALLED_APPS = tuple(list(INSTALLED_APPS) + LOCAL_APPS)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
|
import importlib
|
||||||
|
|
||||||
from django.urls import path, re_path
|
from django.urls import path, re_path
|
||||||
from oxdjango.http import HttpFileResponse
|
from oxdjango.http import HttpFileResponse
|
||||||
|
|
@ -88,3 +89,17 @@ urlpatterns += [
|
||||||
path(r'', app.views.index),
|
path(r'', app.views.index),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if settings.LOCAL_URLPATTERNS:
|
||||||
|
patterns = []
|
||||||
|
for pattern, fn in settings.LOCAL_URLPATTERNS:
|
||||||
|
if isinstnace(fn, 'str'):
|
||||||
|
m, f = fn.rsplit('.', 1)
|
||||||
|
try:
|
||||||
|
m = importlib.import_module(m)
|
||||||
|
except ImportError:
|
||||||
|
logger.error('failed to import urllib module: %s', fn, exc_info=True)
|
||||||
|
continue
|
||||||
|
fn = getattr(m, f)
|
||||||
|
patterns.append(re_path(pattern, fn))
|
||||||
|
urlpatterns = patterns + urlpatterns
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue