From 67b717d10c5c91cdf3a4278a52e7f2bb7839a976 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sat, 31 Oct 2020 04:32:03 -0500 Subject: [PATCH] git init --- manage.py | 22 ++++ simple_viewer/__init__.py | 0 .../__pycache__/__init__.cpython-37.pyc | Bin 0 -> 157 bytes .../__pycache__/settings.cpython-37.pyc | Bin 0 -> 2320 bytes simple_viewer/__pycache__/urls.cpython-37.pyc | Bin 0 -> 985 bytes simple_viewer/__pycache__/wsgi.cpython-37.pyc | Bin 0 -> 572 bytes simple_viewer/asgi.py | 16 +++ simple_viewer/settings.py | 121 ++++++++++++++++++ simple_viewer/urls.py | 22 ++++ simple_viewer/wsgi.py | 16 +++ viewer/__init__.py | 0 viewer/__pycache__/__init__.cpython-37.pyc | Bin 0 -> 150 bytes viewer/__pycache__/urls.cpython-37.pyc | Bin 0 -> 279 bytes viewer/__pycache__/views.cpython-37.pyc | Bin 0 -> 407 bytes viewer/admin.py | 3 + viewer/apps.py | 5 + viewer/migrations/__init__.py | 0 viewer/models.py | 3 + viewer/tests.py | 3 + viewer/urls.py | 7 + viewer/views.py | 7 + 21 files changed, 225 insertions(+) create mode 100644 manage.py create mode 100644 simple_viewer/__init__.py create mode 100644 simple_viewer/__pycache__/__init__.cpython-37.pyc create mode 100644 simple_viewer/__pycache__/settings.cpython-37.pyc create mode 100644 simple_viewer/__pycache__/urls.cpython-37.pyc create mode 100644 simple_viewer/__pycache__/wsgi.cpython-37.pyc create mode 100644 simple_viewer/asgi.py create mode 100644 simple_viewer/settings.py create mode 100644 simple_viewer/urls.py create mode 100644 simple_viewer/wsgi.py create mode 100644 viewer/__init__.py create mode 100644 viewer/__pycache__/__init__.cpython-37.pyc create mode 100644 viewer/__pycache__/urls.cpython-37.pyc create mode 100644 viewer/__pycache__/views.cpython-37.pyc create mode 100644 viewer/admin.py create mode 100644 viewer/apps.py create mode 100644 viewer/migrations/__init__.py create mode 100644 viewer/models.py create mode 100644 viewer/tests.py create mode 100644 viewer/urls.py create mode 100644 viewer/views.py diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..26d5deb --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'simple_viewer.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/simple_viewer/__init__.py b/simple_viewer/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/simple_viewer/__pycache__/__init__.cpython-37.pyc b/simple_viewer/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c58e506b8c3647d3684f3894a33469ddfd58cd60 GIT binary patch literal 157 zcmZ?b<>g`kf_GAL<3aRe5CH>>K!yVl7qb9~6oz01O-8?!3`HPe1o6ww%_=6KC_lX@ zF*i3eFFhupvLquv43+NKMjIN-o z=$b7M9$o(+*u1`qZs_OGSLi0_-MY>p@k562`Wm{8?tsp1ba&LQkJ_&ZZwvZ)^o@Q2 z-P13EKbPRW4DS_mU%!enDpx9*Pk4?iRtKhM`y$1R5znS#&ksdP+`z%cKEVe#6ob$o zV2eq`;x_hhXflk%?ohmkM#zUIa)~EWW`=B{c~6WeaETM@4e7D;1khW+?D`=Vi3dhp zlM&w&;bDCOW{HEp121r~&sacTl*`Dss5G`Q^}zDoGWNEXS`ee`9FdhwW)5GrFr!4s4{qqN}9<1As0%K2$FO1hES-!_Y(v?OrjL*-{ zM!C+*un31(djr$jgUpwH-U>|@w}Ldq=?re|v&xd9 z(4ld8!o@HY9Tb<;1rqF`Y4S_eQJrZMF-;bynp9sKWy2veph7J0(hq5Tf1dB8j)ZVG zvg2=0p&8=$P%SKeFws5A*fhXjU`_)cZ_Ftl1@#MnsjMU<`Axa3#n)z)gQrW)V;Jbnk%CXyKh5c<)+CV7N=X5_G=G)LXzaMJemTEPIxT)&JMD>&#{{oVOVEs591`m!!vgjmMpVysv`Snk!!Zv< zR4!dh@`eE?v|%I}pCTzQOBOYy(XPvyq9&`m>UJ%~)@v0xO`v44Dr<7;f|^{BJKAfb zEvxEoYo}_wmFqPSwjl48>vD6uBX284rBzjcu+~rvy#+Z^=z#OJ$KN-{z53%v%_Nu3 zX*#S&0~?jpr{B5o4#Z*9{Ij+7;$1uRZ8#9%KWV>f4_V*$(y8>PO5c5!(etCpPgx3v zN#RG=N0EbHo&jpAK_l=5ekr?}7qUV|$YuEHofD?L^qb2HFkZ>PHPKkf3Hh|YQp{!3 LyI27H_|E+cYHt#E literal 0 HcmV?d00001 diff --git a/simple_viewer/__pycache__/urls.cpython-37.pyc b/simple_viewer/__pycache__/urls.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73d02383e84de03eb6b0edc530a16635bb2c4612 GIT binary patch literal 985 zcma)5-D=w~7_}Xz$((lEBk0aCWH#MyhFQnfvarG!VLvw};3}44J6MvDgJ0iqhCaFbb_}6-N;fnF`4U^IX(YY-py#Ot6UZ=tX!QX;GJ%iVQe{ z>s92v`;LuP6?^lBXGY!r+K%)*L~jW}m?JPGq>d3m(>yQ;8K&sJcJ9I^gSh0q0+Mo8ENb&&HOxH|O@RAcZV zR$aBG!97LSJgXW~@*G0w?laahDCQxb>n<1sQlLBrOQ!)^_ff|Cxc21;P2dNSJ$BZG z@?f>AO5_m)c(}z1|2YEBdysq7}^M~Jew&EPnicu=OI-7FwZ3xK9dV!OT5)opvl4J zFS8f<99IEz36;jR0UPp_FIArYj;4@dFR7oD5O{OP@5re4Pu?C4`{#UgdU-h*_DB5v z`N@ZOr`P-UJjgtRpls=Tow~z$6vBB;(btc+a{2o7;#Ts6M?$vr9mRSjoWt?TZqt@W?F5!N@U LO}q3VeMJ8OP1(28 literal 0 HcmV?d00001 diff --git a/simple_viewer/asgi.py b/simple_viewer/asgi.py new file mode 100644 index 0000000..9b14295 --- /dev/null +++ b/simple_viewer/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for simple_viewer project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'simple_viewer.settings') + +application = get_asgi_application() diff --git a/simple_viewer/settings.py b/simple_viewer/settings.py new file mode 100644 index 0000000..4b2d56c --- /dev/null +++ b/simple_viewer/settings.py @@ -0,0 +1,121 @@ +""" +Django settings for simple_viewer project. + +Generated by 'django-admin startproject' using Django 3.1.2. + +For more information on this file, see +https://docs.djangoproject.com/en/3.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/3.1/ref/settings/ +""" +import os +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'vo_(copyf#c6$x6s7o3xhsoikl3_0y!sxb#4tp9q7+@+$g0p_k' + +# 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 = 'simple_viewer.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 = 'simple_viewer.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/3.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/3.1/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/3.1/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/3.1/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/simple_viewer/urls.py b/simple_viewer/urls.py new file mode 100644 index 0000000..acb3a4a --- /dev/null +++ b/simple_viewer/urls.py @@ -0,0 +1,22 @@ +"""simple_viewer URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/3.1/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('viewer.urls')), + path('admin/', admin.site.urls), +] diff --git a/simple_viewer/wsgi.py b/simple_viewer/wsgi.py new file mode 100644 index 0000000..d46bdce --- /dev/null +++ b/simple_viewer/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for simple_viewer 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/3.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'simple_viewer.settings') + +application = get_wsgi_application() diff --git a/viewer/__init__.py b/viewer/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/viewer/__pycache__/__init__.cpython-37.pyc b/viewer/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..385d18ec2dbe945d5b584ceff4f0475b46ceec73 GIT binary patch literal 150 zcmZ?b<>g`kf)d@i@gVv!h=2h`Aj1KOi&=m~3PUi1CZpdpDbCC-$VrVa%S924V&P%8F2ta@|!pd4o0U0QhSyd}3P(qGs$U#H# zraD<`xOo=k>`FVLlqsLuc(}^nLZ5m(ha{5j9pEd|uC@477HJMc>${ZJ*X%CwFgk7x_!2`CdOI21vo!kVFR)BC UUD9l2M>rZ>^M`@e7TH351NCM{T>t<8 literal 0 HcmV?d00001 diff --git a/viewer/__pycache__/views.cpython-37.pyc b/viewer/__pycache__/views.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46b7b03bc232d081172e412e3bf4686a54b7b0cf GIT binary patch literal 407 zcmYjN!Ab)$5KXe(wrC4}!XCUV*!=)0A_`J3QuH7!3#Bw;cT0A&PExhK>TmP|{0@J> z^Ikpq3!a>56*@3)UM7>5mt6Gw2ZG{ru$g>N{o=)cC?e;S?wCLeEsZE;DkXDeR2ifJ z@j$oUMB38forv4tG$~@)v=J%|NUS&VzP<%l+seUA@;(JumcOKQT>?+?uaYFxI=-f( zFVRy0&(VX$$mbBbqO1)JxCa>3XcsW^$+|xRW9&(EZ_(%^mKcx}UD`o-T!QoO0z>Nj z46jbJG1@s!%d)8E*?8r1TXBnZT(*;+?Buh(;*xsRgasR7A;+GD!Vck09HvKlF|Fn{ rak)i5TY85)&>a4?b9(yL()PgC${w_Nv^y-VUK%*#A8{>$p6aPzOG{;n literal 0 HcmV?d00001 diff --git a/viewer/admin.py b/viewer/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/viewer/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/viewer/apps.py b/viewer/apps.py new file mode 100644 index 0000000..1a9f1b4 --- /dev/null +++ b/viewer/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ViewerConfig(AppConfig): + name = 'viewer' diff --git a/viewer/migrations/__init__.py b/viewer/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/viewer/models.py b/viewer/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/viewer/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/viewer/tests.py b/viewer/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/viewer/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/viewer/urls.py b/viewer/urls.py new file mode 100644 index 0000000..2fcca0d --- /dev/null +++ b/viewer/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='index') +] diff --git a/viewer/views.py b/viewer/views.py new file mode 100644 index 0000000..e00860a --- /dev/null +++ b/viewer/views.py @@ -0,0 +1,7 @@ +from django.shortcuts import render + +from django.http import HttpResponse + +def index(request): + """Index view for the simple-viewer project.""" + return HttpResponse('Hello, World.')