From a8489c38a35a928a69ddd3ed81e4bcf6ebf93afc Mon Sep 17 00:00:00 2001 From: Andrew Buss Date: Tue, 28 Apr 2015 08:32:56 -0700 Subject: [PATCH] Set up flashy project and flashcards app --- .gitignore | 3 + flashy/flashcards/__init__.py | 0 flashy/flashcards/admin.py | 3 + flashy/flashcards/migrations/__init__.py | 0 flashy/flashcards/models.py | 3 + flashy/flashcards/tests.py | 3 + flashy/flashcards/views.py | 3 + flashy/flashy/__init__.py | 0 flashy/flashy/settings.py | 102 +++++++++++++++++++++++++++++++ flashy/flashy/urls.py | 10 +++ flashy/flashy/wsgi.py | 16 +++++ flashy/manage.py | 10 +++ 12 files changed, 153 insertions(+) create mode 100644 .gitignore create mode 100644 flashy/flashcards/__init__.py create mode 100644 flashy/flashcards/admin.py create mode 100644 flashy/flashcards/migrations/__init__.py create mode 100644 flashy/flashcards/models.py create mode 100644 flashy/flashcards/tests.py create mode 100644 flashy/flashcards/views.py create mode 100644 flashy/flashy/__init__.py create mode 100644 flashy/flashy/settings.py create mode 100644 flashy/flashy/urls.py create mode 100644 flashy/flashy/wsgi.py create mode 100755 flashy/manage.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5357bbe --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +venv* +*.pyc \ No newline at end of file diff --git a/flashy/flashcards/__init__.py b/flashy/flashcards/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/flashy/flashcards/admin.py b/flashy/flashcards/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/flashy/flashcards/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/flashy/flashcards/migrations/__init__.py b/flashy/flashcards/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/flashy/flashcards/models.py b/flashy/flashcards/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/flashy/flashcards/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/flashy/flashcards/tests.py b/flashy/flashcards/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/flashy/flashcards/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/flashy/flashcards/views.py b/flashy/flashcards/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/flashy/flashcards/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/flashy/flashy/__init__.py b/flashy/flashy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/flashy/flashy/settings.py b/flashy/flashy/settings.py new file mode 100644 index 0000000..182d519 --- /dev/null +++ b/flashy/flashy/settings.py @@ -0,0 +1,102 @@ +""" +Django settings for flashy project. + +Generated by 'django-admin startproject' using Django 1.8. + +For more information on this file, see +https://docs.djangoproject.com/en/1.8/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.8/ref/settings/ +""" + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +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/1.8/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '8)#-j&8dghe-y&v4a%r6u#y@r86&6nfv%k$(a((r-zh$m3ct!9' + +# 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', +) + +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 = 'flashy.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 = 'flashy.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.8/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Internationalization +# https://docs.djangoproject.com/en/1.8/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.8/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/flashy/flashy/urls.py b/flashy/flashy/urls.py new file mode 100644 index 0000000..20aacbe --- /dev/null +++ b/flashy/flashy/urls.py @@ -0,0 +1,10 @@ +from django.conf.urls import include, url +from django.contrib import admin + +urlpatterns = [ + # Examples: + # url(r'^$', 'flashy.views.home', name='home'), + # url(r'^blog/', include('blog.urls')), + + url(r'^admin/', include(admin.site.urls)), +] diff --git a/flashy/flashy/wsgi.py b/flashy/flashy/wsgi.py new file mode 100644 index 0000000..9407c47 --- /dev/null +++ b/flashy/flashy/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for flashy 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.8/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flashy.settings") + +application = get_wsgi_application() diff --git a/flashy/manage.py b/flashy/manage.py new file mode 100755 index 0000000..53642c0 --- /dev/null +++ b/flashy/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "flashy.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) -- 1.9.1