diff --git a/.gitignore b/.gitignore index 604e3df..9812d3d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .project .pydevproject *.pyc +citavi_mapper/private_settings.py diff --git a/citavi_mapper/private_settings.example.py b/citavi_mapper/private_settings.example.py new file mode 100644 index 0000000..dec2449 --- /dev/null +++ b/citavi_mapper/private_settings.example.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'SECRET' + +# Database +# https://docs.djangoproject.com/en/1.6/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'citavi_mapper', + 'USER': 'citavi_mapper', + 'PASSWORD': 'SECRET', + 'HOST': 'localhost', + 'PORT': '5432' + } +} diff --git a/citavi_mapper/settings.py b/citavi_mapper/settings.py index 838df29..8e39ff7 100644 --- a/citavi_mapper/settings.py +++ b/citavi_mapper/settings.py @@ -18,9 +18,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '$0$7v0&fg0yh*77_bre9_+1clj1b_g8flt=)c&5d^je9yvissh' - # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True @@ -38,8 +35,9 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'pipeline', 'crispy_forms', - 'hello', + 'frontend', ) MIDDLEWARE_CLASSES = ( @@ -55,23 +53,36 @@ ROOT_URLCONF = 'citavi_mapper.urls' WSGI_APPLICATION = 'citavi_mapper.wsgi.application' +STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' -CRISPY_TEMPLATE_PACK = 'bootstrap3' +PIPELINE_CSS = { + 'colors': { + 'source_filenames': ( + 'css/core.css', + 'css/colors/*.css', + 'css/layers.css' + ), + 'output_filename': 'css/colors.css', + 'extra_context': { + 'media': 'screen,projection', + }, + }, +} -# Database -# https://docs.djangoproject.com/en/1.6/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'citavi_mapper', - 'USER': 'citavi_mapper', - 'PASSWORD': 'foobar2000', - 'HOST': 'pgdb.it.hs-hannover.de', - 'PORT': '5432' +PIPELINE_JS = { + 'stats': { + 'source_filenames': ( + 'js/jquery.js', + 'js/d3.js', + 'js/collections/*.js', + 'js/application.js', + ), + 'output_filename': 'js/stats.js', } } +CRISPY_TEMPLATE_PACK = 'bootstrap3' + # Internationalization # https://docs.djangoproject.com/en/1.6/topics/i18n/ @@ -90,3 +101,8 @@ USE_TZ = True # https://docs.djangoproject.com/en/1.6/howto/static-files/ STATIC_URL = '/static/' + + + +# import the private settings last to allow override +from private_settings import * diff --git a/citavi_mapper/urls.py b/citavi_mapper/urls.py index 200f950..0d39edc 100644 --- a/citavi_mapper/urls.py +++ b/citavi_mapper/urls.py @@ -5,10 +5,12 @@ from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() +from frontend.views import MainSite + urlpatterns = patterns('', # Examples: # url(r'^$', 'citavi_mapper.views.home', name='home'), # url(r'^blog/', include('blog.urls')), - url(r'^hello/', include('hello.urls')), + url(r'^$', MainSite.as_view(), name='frontend-index'), url(r'^admin/', include(admin.site.urls)), ) diff --git a/hello/templates/hello.html b/frontend/__init__.py similarity index 100% rename from hello/templates/hello.html rename to frontend/__init__.py diff --git a/hello/admin.py b/frontend/admin.py similarity index 100% rename from hello/admin.py rename to frontend/admin.py diff --git a/hello/models.py b/frontend/models.py similarity index 100% rename from hello/models.py rename to frontend/models.py diff --git a/frontend/templates/base.html b/frontend/templates/base.html new file mode 100644 index 0000000..bb031bb --- /dev/null +++ b/frontend/templates/base.html @@ -0,0 +1,16 @@ + + +
+ + + + +