Erste App mit manage.py erstellt
authorSven Arnold <sven@internetallee.de>
Mon, 8 Feb 2016 15:09:12 +0000 (16:09 +0100)
committerSven Arnold <sven@internetallee.de>
Mon, 8 Feb 2016 15:09:12 +0000 (16:09 +0100)
project/books/__init__.py [new file with mode: 0644]
project/books/admin.py [new file with mode: 0644]
project/books/migrations/__init__.py [new file with mode: 0644]
project/books/models.py [new file with mode: 0644]
project/books/tests.py [new file with mode: 0644]
project/books/views.py [new file with mode: 0644]
project/manage.py [new file with mode: 0755]
project/project/__init__.py [new file with mode: 0644]
project/project/settings.py [new file with mode: 0644]
project/project/urls.py [new file with mode: 0644]
project/project/wsgi.py [new file with mode: 0644]

diff --git a/project/books/__init__.py b/project/books/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/project/books/admin.py b/project/books/admin.py
new file mode 100644 (file)
index 0000000..8c38f3f
--- /dev/null
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/project/books/migrations/__init__.py b/project/books/migrations/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/project/books/models.py b/project/books/models.py
new file mode 100644 (file)
index 0000000..71a8362
--- /dev/null
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/project/books/tests.py b/project/books/tests.py
new file mode 100644 (file)
index 0000000..7ce503c
--- /dev/null
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/project/books/views.py b/project/books/views.py
new file mode 100644 (file)
index 0000000..91ea44a
--- /dev/null
@@ -0,0 +1,3 @@
+from django.shortcuts import render
+
+# Create your views here.
diff --git a/project/manage.py b/project/manage.py
new file mode 100755 (executable)
index 0000000..71b3fa5
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+import os
+import sys
+
+if __name__ == "__main__":
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)
diff --git a/project/project/__init__.py b/project/project/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/project/project/settings.py b/project/project/settings.py
new file mode 100644 (file)
index 0000000..0ac5843
--- /dev/null
@@ -0,0 +1,84 @@
+"""
+Django settings for project project.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/1.7/ref/settings/
+"""
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import os
+BASE_DIR = os.path.dirname(os.path.dirname(__file__))
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = '%#sxnk#)g7ydi7^zh-=+5@!zl+_1fuub*=c@=b2n1(g5drgfee'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+TEMPLATE_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',
+    'books',
+)
+
+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',
+)
+
+ROOT_URLCONF = 'project.urls'
+
+WSGI_APPLICATION = 'project.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/1.7/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.7/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.7/howto/static-files/
+
+STATIC_URL = '/static/'
diff --git a/project/project/urls.py b/project/project/urls.py
new file mode 100644 (file)
index 0000000..935a60a
--- /dev/null
@@ -0,0 +1,10 @@
+from django.conf.urls import patterns, include, url
+from django.contrib import admin
+
+urlpatterns = patterns('',
+    # Examples:
+    # url(r'^$', 'project.views.home', name='home'),
+    # url(r'^blog/', include('blog.urls')),
+
+    url(r'^admin/', include(admin.site.urls)),
+)
diff --git a/project/project/wsgi.py b/project/project/wsgi.py
new file mode 100644 (file)
index 0000000..aa7fdcf
--- /dev/null
@@ -0,0 +1,14 @@
+"""
+WSGI config for project 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.7/howto/deployment/wsgi/
+"""
+
+import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()