add mapdata app and configuration
This commit is contained in:
parent
0f65f63eab
commit
772ec7c654
6 changed files with 30 additions and 0 deletions
5
src/c3nav/mapdata/__init__.py
Normal file
5
src/c3nav/mapdata/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from .classes import MapDataManager
|
||||
|
||||
default_app_config = 'c3nav.mapdata.apps.MapdataConfig'
|
||||
|
||||
objects = MapDataManager()
|
9
src/c3nav/mapdata/apps.py
Normal file
9
src/c3nav/mapdata/apps.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MapdataConfig(AppConfig):
|
||||
name = 'c3nav.mapdata'
|
||||
verbose_name = 'map data manager'
|
||||
|
||||
def ready(self):
|
||||
pass
|
8
src/c3nav/mapdata/classes.py
Normal file
8
src/c3nav/mapdata/classes.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
class MapDataManager:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
class MapDataSource:
|
||||
def __init__(self):
|
||||
pass
|
3
src/c3nav/mapdata/views.py
Normal file
3
src/c3nav/mapdata/views.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
|
@ -17,6 +17,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|||
DATA_DIR = config.get('c3nav', 'datadir', fallback=os.environ.get('DATA_DIR', 'data'))
|
||||
LOG_DIR = os.path.join(DATA_DIR, 'logs')
|
||||
|
||||
MAP_DIRS = config.get('c3nav', 'mapdir', fallback=None)
|
||||
|
||||
if not os.path.exists(DATA_DIR):
|
||||
os.mkdir(DATA_DIR)
|
||||
if not os.path.exists(LOG_DIR):
|
||||
|
@ -103,6 +105,7 @@ INSTALLED_APPS = [
|
|||
'compressor',
|
||||
'bootstrap3',
|
||||
'c3nav.control',
|
||||
'c3nav.mapdata',
|
||||
]
|
||||
|
||||
MIDDLEWARE_CLASSES = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue