[TASK] Add private_settings.py, move some settings there.
This commit is contained in:
parent
229ffb9939
commit
06fd6da45f
|
@ -2,3 +2,4 @@
|
|||
.project
|
||||
.pydevproject
|
||||
*.pyc
|
||||
citavi_mapper/private_settings.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'
|
||||
}
|
||||
}
|
|
@ -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 *
|
||||
|
|
|
@ -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)),
|
||||
)
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Merging Citavi projects and mapping existing datasets.">
|
||||
<title>{% block title %}Citavi Mapper :: {{ title }}{% endblock %}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ headline }}</h1>
|
||||
<div id="content">
|
||||
{% block content %}{{ content }}{% endblock %}t
|
||||
<div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
class MainSite(TemplateView):
|
||||
template_name = "base.html"
|
||||
|
||||
def get(self, request, **kwargs):
|
||||
self._request = request
|
||||
return super(MainSite, self).get(request, **kwargs)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(MainSite, self).get_context_data(**kwargs)
|
||||
context['title'] = 'Titeltest'
|
||||
context['content'] = 'Foobar!'
|
||||
context['headline'] = 'Yo!'
|
||||
return context
|
|
@ -1,2 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
from hello import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^$', views.Hello.as_view(), name='hello'),
|
||||
url(r'^formtest/$', views.FormTest.as_view(), name='formtest')
|
||||
)
|
|
@ -1,11 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.views.generic import TemplateView
|
||||
from django.views.generic import FormView
|
||||
|
||||
class Hello(TemplateView):
|
||||
template_name = "hello.html"
|
||||
|
||||
class FormTest(FormView):
|
||||
pass
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block title %}Citavi Mapper{% endblock %}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{% block headline %}{% endblock %}</h1>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +1,4 @@
|
|||
psycopg2
|
||||
django
|
||||
django-crispy-forms
|
||||
django-pipeline
|
||||
|
|
Loading…
Reference in New Issue