diff options
author | Kyle K <kylek389@gmail.com> | 2017-03-26 22:03:45 -0500 |
---|---|---|
committer | Kyle K <kylek389@gmail.com> | 2017-03-26 22:03:45 -0500 |
commit | eb98f903635b2b10cc40271e58591e522226784d (patch) | |
tree | 7174398daf55733972f9f2fd5f9c3a91029200ac /django_clscrap | |
download | CLscrap-eb98f903635b2b10cc40271e58591e522226784d.tar.gz CLscrap-eb98f903635b2b10cc40271e58591e522226784d.tar.bz2 CLscrap-eb98f903635b2b10cc40271e58591e522226784d.zip |
initial commit
Diffstat (limited to 'django_clscrap')
-rw-r--r-- | django_clscrap/__init__.py | 0 | ||||
-rw-r--r-- | django_clscrap/settings.py | 122 | ||||
-rw-r--r-- | django_clscrap/urls.py | 24 | ||||
-rw-r--r-- | django_clscrap/wsgi.py | 16 |
4 files changed, 162 insertions, 0 deletions
diff --git a/django_clscrap/__init__.py b/django_clscrap/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/django_clscrap/__init__.py diff --git a/django_clscrap/settings.py b/django_clscrap/settings.py new file mode 100644 index 0000000..27cb351 --- /dev/null +++ b/django_clscrap/settings.py @@ -0,0 +1,122 @@ +""" +Django settings for django_clscrap project. + +Generated by 'django-admin startproject' using Django 1.10.6. + +For more information on this file, see +https://docs.djangoproject.com/en/1.10/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.10/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +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/1.10/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '-(n)6%3v7^c-nbqc%re3@12n@!buzm(+i!ihqs=14#udznc8f@' + +# 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', + # 'myapp.apps.MyappConfig' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'django_clscrap.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(BASE_DIR, 'templates')] + , + '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 = 'django_clscrap.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.10/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.10/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/1.10/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/django_clscrap/urls.py b/django_clscrap/urls.py new file mode 100644 index 0000000..66dca1d --- /dev/null +++ b/django_clscrap/urls.py @@ -0,0 +1,24 @@ +"""django_clscrap URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.10/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import include, url +from django.contrib import admin +from django.http import HttpResponseRedirect + +urlpatterns = [ + url(r'^$', lambda r: HttpResponseRedirect('app/')), # 302 redirect from / to app/index + url(r'^admin/', admin.site.urls), + url(r'^app/', include('myapp.urls')), +] diff --git a/django_clscrap/wsgi.py b/django_clscrap/wsgi.py new file mode 100644 index 0000000..16e14e0 --- /dev/null +++ b/django_clscrap/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for django_clscrap 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/1.10/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_clscrap.settings") + +application = get_wsgi_application() |