From 0af285a6e92a50fb3d727c2c6b3e59cfa1c13f44 Mon Sep 17 00:00:00 2001 From: James Turk Date: Tue, 31 Mar 2015 17:22:48 -0400 Subject: [PATCH] django stuff --- manage.py | 10 ++++++ web/__init__.py | 0 web/settings.py | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ web/urls.py | 10 ++++++ web/wsgi.py | 16 +++++++++ 5 files changed, 126 insertions(+) create mode 100755 manage.py create mode 100644 web/__init__.py create mode 100644 web/settings.py create mode 100644 web/urls.py create mode 100644 web/wsgi.py diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..40507fb --- /dev/null +++ b/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/web/__init__.py b/web/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/web/settings.py b/web/settings.py new file mode 100644 index 0000000..31b904e --- /dev/null +++ b/web/settings.py @@ -0,0 +1,90 @@ +import os + +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'i-j!g6wtv7^2&gy#45bseqjuoh_yv@=#$6pt0o9%3w#(t=15fd' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = ( + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'lifting', +) + +MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django.middleware.security.SecurityMiddleware', +) + +ROOT_URLCONF = 'web.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'web.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/dev/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Internationalization +# https://docs.djangoproject.com/en/dev/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/dev/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/web/urls.py b/web/urls.py new file mode 100644 index 0000000..49762b6 --- /dev/null +++ b/web/urls.py @@ -0,0 +1,10 @@ +from django.conf.urls import include, url +from django.contrib import admin + +urlpatterns = [ + # Examples: + # url(r'^$', 'web.views.home', name='home'), + # url(r'^blog/', include('blog.urls')), + + url(r'^admin/', include(admin.site.urls)), +] diff --git a/web/wsgi.py b/web/wsgi.py new file mode 100644 index 0000000..99682cd --- /dev/null +++ b/web/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for bia project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings") + +application = get_wsgi_application()