diff --git a/app_11/mysite/db.sqlite3 b/app_11/mysite/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app_11/mysite/hello/__init__.py b/app_11/mysite/hello/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app_11/mysite/hello/__pycache__/__init__.cpython-36.pyc b/app_11/mysite/hello/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5454459c2fe5059f207d5d19df269c43c2257f45 Binary files /dev/null and b/app_11/mysite/hello/__pycache__/__init__.cpython-36.pyc differ diff --git a/app_11/mysite/hello/__pycache__/urls.cpython-36.pyc b/app_11/mysite/hello/__pycache__/urls.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e90c546a42b1f0c3468ca8ab1e4c1b3f55ffce31 Binary files /dev/null and b/app_11/mysite/hello/__pycache__/urls.cpython-36.pyc differ diff --git a/app_11/mysite/hello/__pycache__/views.cpython-36.pyc b/app_11/mysite/hello/__pycache__/views.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3c02afdb1d3b299209b4dbbaa8aa1de110f09647 Binary files /dev/null and b/app_11/mysite/hello/__pycache__/views.cpython-36.pyc differ diff --git a/app_11/mysite/hello/admin.py b/app_11/mysite/hello/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/app_11/mysite/hello/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/app_11/mysite/hello/apps.py b/app_11/mysite/hello/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..73434282c139798d4ba0beb71d93ae1b6534cc96 --- /dev/null +++ b/app_11/mysite/hello/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class HelloConfig(AppConfig): + name = 'hello' diff --git a/app_11/mysite/hello/migrations/__init__.py b/app_11/mysite/hello/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app_11/mysite/hello/models.py b/app_11/mysite/hello/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/app_11/mysite/hello/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/app_11/mysite/hello/tests.py b/app_11/mysite/hello/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/app_11/mysite/hello/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/app_11/mysite/hello/urls.py b/app_11/mysite/hello/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..cc9a1bf78ce5e85442409b3233c33bac3a8a5ffa --- /dev/null +++ b/app_11/mysite/hello/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path("", views.index) + +] diff --git a/app_11/mysite/hello/views.py b/app_11/mysite/hello/views.py new file mode 100644 index 0000000000000000000000000000000000000000..a127cd09ec5da8d45aadbb5738ad973a15c186c8 --- /dev/null +++ b/app_11/mysite/hello/views.py @@ -0,0 +1,6 @@ +from django.shortcuts import render +from django.http import HttpResponse + +# Create your views here. +def index(request): + return HttpResponse("Hello world!") diff --git a/app_11/mysite/manage.py b/app_11/mysite/manage.py new file mode 100755 index 0000000000000000000000000000000000000000..341863cf62fa5e89fb18b7fc46655038624623c9 --- /dev/null +++ b/app_11/mysite/manage.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/app_11/mysite/mysite/__init__.py b/app_11/mysite/mysite/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app_11/mysite/mysite/__pycache__/__init__.cpython-36.pyc b/app_11/mysite/mysite/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..35a4681897ce319298935520aae5df5e642a4c69 Binary files /dev/null and b/app_11/mysite/mysite/__pycache__/__init__.cpython-36.pyc differ diff --git a/app_11/mysite/mysite/__pycache__/settings.cpython-36.pyc b/app_11/mysite/mysite/__pycache__/settings.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0051036091564934a10775ee3321f18c2ee86112 Binary files /dev/null and b/app_11/mysite/mysite/__pycache__/settings.cpython-36.pyc differ diff --git a/app_11/mysite/mysite/__pycache__/urls.cpython-36.pyc b/app_11/mysite/mysite/__pycache__/urls.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66cceb85ccf3b3aa6aa00f4f1569ccba3a552d02 Binary files /dev/null and b/app_11/mysite/mysite/__pycache__/urls.cpython-36.pyc differ diff --git a/app_11/mysite/mysite/__pycache__/wsgi.cpython-36.pyc b/app_11/mysite/mysite/__pycache__/wsgi.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f2bbe25d0da77f5e943e14265869776c759b1f84 Binary files /dev/null and b/app_11/mysite/mysite/__pycache__/wsgi.cpython-36.pyc differ diff --git a/app_11/mysite/mysite/settings.py b/app_11/mysite/mysite/settings.py new file mode 100644 index 0000000000000000000000000000000000000000..a284213eeab14d6c4a621ec7ce3b148bb9878ce3 --- /dev/null +++ b/app_11/mysite/mysite/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for mysite project. + +Generated by 'django-admin startproject' using Django 2.2.6. + +For more information on this file, see +https://docs.djangoproject.com/en/2.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.2/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/2.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'f&lg318yw(2471!9xp8je0g&2)0511$-rm_c$=%y&_2!zs0&g5' + +# 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 = [ + '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 = 'mysite.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 = 'mysite.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.2/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/2.2/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/2.2/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/2.2/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/app_11/mysite/mysite/urls.py b/app_11/mysite/mysite/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..7c7e859b0f8b58097af58aff02ac3e8e87f78b9c --- /dev/null +++ b/app_11/mysite/mysite/urls.py @@ -0,0 +1,22 @@ +"""mysite URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.2/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import include, path + +urlpatterns = [ + path("", include("hello.urls")), + path('admin/', admin.site.urls), +] diff --git a/app_11/mysite/mysite/wsgi.py b/app_11/mysite/mysite/wsgi.py new file mode 100644 index 0000000000000000000000000000000000000000..45e28c9a193bbc0df9f52f85b7cc75122951f7bd --- /dev/null +++ b/app_11/mysite/mysite/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for mysite 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/2.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings') + +application = get_wsgi_application()