add mapdata app and configuration

This commit is contained in:
Laura Klünder 2016-08-18 21:23:15 +02:00
parent 0f65f63eab
commit 772ec7c654
6 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,5 @@
from .classes import MapDataManager
default_app_config = 'c3nav.mapdata.apps.MapdataConfig'
objects = MapDataManager()

View 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

View file

@ -0,0 +1,8 @@
class MapDataManager:
def __init__(self):
pass
class MapDataSource:
def __init__(self):
pass

View file

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

View file

@ -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 = [