From b648b13149efda3d9c542c3ca562dd6020c7cee6 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 2 Apr 2021 09:46:56 -0400 Subject: [PATCH] start project --- manage.py | 22 ++++ timer_backend/.settings.py.swp | Bin 0 -> 12288 bytes timer_backend/__init__.py | 0 .../__pycache__/__init__.cpython-39.pyc | Bin 0 -> 162 bytes .../__pycache__/settings.cpython-39.pyc | Bin 0 -> 2250 bytes timer_backend/asgi.py | 16 +++ timer_backend/settings.py | 120 ++++++++++++++++++ timer_backend/urls.py | 21 +++ timer_backend/wsgi.py | 16 +++ 9 files changed, 195 insertions(+) create mode 100755 manage.py create mode 100644 timer_backend/.settings.py.swp create mode 100644 timer_backend/__init__.py create mode 100644 timer_backend/__pycache__/__init__.cpython-39.pyc create mode 100644 timer_backend/__pycache__/settings.cpython-39.pyc create mode 100644 timer_backend/asgi.py create mode 100644 timer_backend/settings.py create mode 100644 timer_backend/urls.py create mode 100644 timer_backend/wsgi.py diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..2f0cecf --- /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', 'timer_backend.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/timer_backend/.settings.py.swp b/timer_backend/.settings.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..5f68a0218febbdaad33450849f0af746958ed72b GIT binary patch literal 12288 zcmeI2OKcm*8OO&>(ligdL34U!MQx5@h3(x>5;KcdQa+jhcD|VdZ zkYow`wA^{m|NG{fAvEprrSd$T(IyE#4-ry*Z29aO&`L=2Gm}d{(TIri$QjI`p!OE5` zXBn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*tQ-5oNIe67fcvG1>uyV{RUr<(+8_pRSs|Sq7NAfnj83jTNZYdR$mj&KA{868dh%smrTKEPSSg(} z7S(nL6Rx+;a0u}x9q-Y%u)r4C=^VDmj=kNJawTA?b8R&7$nxBjWxL!%%jGK0D3wa7 zsG`#_!W(OGh$2K{Us67WIEJFNlPG+wR&T_m&k#~9%{J$tM101;;iOb(E|wclQV3Kn zSLY5<+xK#khLK16Tz1hQ)-IJ%=rNo69_1cIRI(#W^|6}}G_Y7|v`&JB2(NSy&?%1P Y+CgZPyr$j8hFiC#D>KID`B=110gAs(O#lD@ literal 0 HcmV?d00001 diff --git a/timer_backend/__init__.py b/timer_backend/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/timer_backend/__pycache__/__init__.cpython-39.pyc b/timer_backend/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb6b51411af98c3084edb6e0193f78acc082cdb1 GIT binary patch literal 162 zcmYe~<>g`k0zdim1Q7igL?8o3AjbiSi&=m~3PUi1CZpdd6^~g@p=W7 Uw>WHa^HWN5Qtdz%dk`*g)?7W%)DFYNp)YPOM+f7jvscDIkg-DcOQgO=*OLJG!+I)q( zjB8%|H*#omDA2#eYft?HJrqULAtl?2Y@n{FUGC0%znvM{)oO)d!;L3=xkbW)8C~&AW_Hi146L>QAWiTkS zAS4czPs5hS=Gh2~gV=RNmry1KgY#qAa1h{Z#F;MIK;tV{mI&+qvy4!>)V@aY>RG$cq47+i#t!B1Fw1f}rMLW1aY=FH(nOxvV%Q5^s4rHS$t3CTwah=SlD*v!F5@2rY1nz<+?A$$-Ilh3ap8R0ijCoFk7kv&V*4A)C6XLu(YGs0(BUZQZys|jgoN2$M3 zwT3A)T6=n0R(d@vUzNH&qt(^)@Wnx^Xp7Y2oLPoWoP+~4$e`eZ(PFg zMp6OdWL+zyMOACIG&L18rK3h=sOn^QCj2~yLYva#AVL;&4uW!bQlH{TVOi#;--B`>aOsY86?#aJA& zT;HfCWf>Yg)Q+sx?xrQng63>lX(@yj=#qn|0N|x%%gWkFMvpKJ+_yL_hR{KLW|nsp zUCnMZt>|ifPc^Jp>i6k*3k}6kGPinqPw5-GR!`CO z{qA1Fdablu!0bYzRojZz>?=*xs&^YI7;JS^%j`l@l=~2HYyB&2ylStnX=yQ|877>; z03Y=%j^DWGA)Gy*{%XouT2L82ZEO@ntAQ&Ge7O-g0I|=goagZBq`1es)35B=2Sy4{ z((*T6fMOTFfDbfBcVQA17w48r!kkbL=F1D^iXaqtcnakYg};Rl!je$R_Qii-T@^kQ OgsJhTumW1+r}!_8e*_r- literal 0 HcmV?d00001 diff --git a/timer_backend/asgi.py b/timer_backend/asgi.py new file mode 100644 index 0000000..9359b2a --- /dev/null +++ b/timer_backend/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for timer_backend 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', 'timer_backend.settings') + +application = get_asgi_application() diff --git a/timer_backend/settings.py b/timer_backend/settings.py new file mode 100644 index 0000000..49e18ad --- /dev/null +++ b/timer_backend/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for timer_backend project. + +Generated by 'django-admin startproject' using Django 3.1.7. + +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/ +""" + +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 = 'kwuq4$3jeof1(0!k7)+1@40t5s3pe5uo2-amnsl50rsrhwncs0' + +# 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 = 'timer_backend.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 = 'timer_backend.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/timer_backend/urls.py b/timer_backend/urls.py new file mode 100644 index 0000000..dbabe74 --- /dev/null +++ b/timer_backend/urls.py @@ -0,0 +1,21 @@ +"""timer_backend 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 path + +urlpatterns = [ + path('admin/', admin.site.urls), +] diff --git a/timer_backend/wsgi.py b/timer_backend/wsgi.py new file mode 100644 index 0000000..776cd6e --- /dev/null +++ b/timer_backend/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for timer_backend 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', 'timer_backend.settings') + +application = get_wsgi_application()