From e49ebd67e524b81ddcf19b749bd70c55112254d4 Mon Sep 17 00:00:00 2001 From: Koichi Nakata <126118326+knakatasf@users.noreply.github.com> Date: Fri, 22 Nov 2024 05:02:38 +0000 Subject: [PATCH] Created --- src/djangodemo/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 140 bytes .../__pycache__/settings.cpython-38.pyc | Bin 0 -> 2330 bytes .../__pycache__/urls.cpython-38.pyc | Bin 0 -> 995 bytes .../__pycache__/wsgi.cpython-38.pyc | Bin 0 -> 549 bytes src/djangodemo/settings.py | 124 ++++++++++++++++++ src/djangodemo/urls.py | 25 ++++ src/djangodemo/wsgi.py | 16 +++ 8 files changed, 165 insertions(+) create mode 100644 src/djangodemo/__init__.py create mode 100644 src/djangodemo/__pycache__/__init__.cpython-38.pyc create mode 100644 src/djangodemo/__pycache__/settings.cpython-38.pyc create mode 100644 src/djangodemo/__pycache__/urls.cpython-38.pyc create mode 100644 src/djangodemo/__pycache__/wsgi.cpython-38.pyc create mode 100644 src/djangodemo/settings.py create mode 100644 src/djangodemo/urls.py create mode 100644 src/djangodemo/wsgi.py diff --git a/src/djangodemo/__init__.py b/src/djangodemo/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/djangodemo/__pycache__/__init__.cpython-38.pyc b/src/djangodemo/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8da7627fd7c44ef6d36cc6f74f085c88a4934235 GIT binary patch literal 140 zcmWIL<>g`kg7lyE=^*+sh(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o6vIzdXMvySN}R zIki~dB`Yy6J>MlYH($TFC|N%R%uNAt~cHK03 zZBc{X1lLE>AB#Hve8AXtc1xGMSFb{bsKoJ(8 z1ZQB;DH>;>3};~pmf;+nhZUz_EW!n&3>O^%B)9~Z;R;-ZYmP)kxc*vlMB^;nFqYs0 z_%MsRO!Dy2n;gimb5u0W!A9kR^YC20kgS??#q@0y&I=Jz{gERN5jwi7ZY)?jOi^$0}tS)2yGj6Xi47?Zl>Q%r%BhMb4& z>q-RznE^ zBJBUfipXFp(C=6eLOWjn>dxl66@Giiv7##UA!gOITJ@{EuX#t_Yu0uKe2 zgBI6jEjZ$Dr>HZdi1?0Y^I@jEHc|E{fJ^qRh$xKMqloeYMW0MsN3!_yS>Kavlqq|C z%$u@WJsAYg*9&~5mi_&QDvJh64aqY~_NP=I&g5btmeYBtxJDSMot58|;p`?3k()Md zjnSO4`rRCf}Ct_xt&kEudH}UXn%qxgkd~eptNgV}9f8@mXPoWu+7uYB~elXEJD%up% z_jpdBjyGnMk6?U{!J%wbN(ztE+EcAvH>7%FM^B3C_O_YL3Z3n4qtn(8`yoSYpE*>q z!Vrrjy+RZy_ytE6K`hIOmYEBq|o9+ zM4v`JmU&XJ`YhuVO*6evOw%YnQgtmo%49x_sLzvT8(2%HBPP5i&KTa09T5G$hb~Qa& z-qp7nseZFjQ`3q`q`iRp$wFQ2s%Z{-az*WRpP1XKuJ3ks>gF@G*+5|j%dOm0+gm+# zOEYVox`u8WEzLAKSRKV4X5XlO*&ffD)z8{VKIL@{+({QB)zWN!5u%$|K^ghGTETjG zjzC~rR_a;X*0IkkEV3tEo)+=Z7exsVlHxaB03(-tho57C#Ym*Z;@l0fSdiwVoRrUr zME1pPx=!6@UA{}-Ka B5bXc} literal 0 HcmV?d00001 diff --git a/src/djangodemo/__pycache__/urls.cpython-38.pyc b/src/djangodemo/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ccac726088a3b3398f86045c885693a6fa3f075c GIT binary patch literal 995 zcma)5O>fgM7kOnRe%Dxz+0}t_l_4$Ae*zkJ~;t}_E!`Ujo+g9zLp9L zsW>jGja0%x;JV~gbF4XEh8Wt`m|8ChVKUQ6SG-no$1{^;QV?E|^W=;eSr?fmHkm+q zO~TiosQ@g!46mCiv+TOE4)iR+uNcF$!iA`%GE0m%N(w9EFY%ZV2c(b>1+1b?{M`8^>klg1k zoGDLcyDnu;z`#SL$WA!iD2~HlaEnpwwSCG&Q9%$`$KgM=_BwqnY6Cm4i`Mxs1D8wQ z#$h{Lt>E&kR_U`nUyx~3u~u-KQ9C&jq2Mv0bW+ot>&|->*qlHYhPQ#$*-nnm{s&Ss zSa;p;Q}Q6yM_tp5YjWjY$rZd3qE$w^8urn++nLml?dZ9XtSR|R4-oVey5MB$P5o&P H`agdG!pkx# literal 0 HcmV?d00001 diff --git a/src/djangodemo/__pycache__/wsgi.cpython-38.pyc b/src/djangodemo/__pycache__/wsgi.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd7cd1359c5dc0e23248b9a789e845d2b6adf166 GIT binary patch literal 549 zcmYjP!EO^V5cO`-CM*;ofjIjbiLQYoLKLL5Q4pkuv_i^dW7d<6gV(dN-K6c6Gyecb ze#uu(d;*-9Y=oMTJl1$T^WHrB^5`gIWYwRO>RZCtuWhhzT?*dP^3TaBHe)JLsYzxD z?H!ZWomnSgkgU4j4^&qj{75P4d}Xskl}_2<@HS?jrlT=0(Jpkw7wEWJNn4?U8hPVz z1!c&yY#caTH|W9humrxVk;cf+2DtQG@*35Zfnx(}FnleYZc|p)p!j?)o5tu;290(; zr+#MyRHFl~En(Jef}^G8+Vh1r@QizaY#Bo1UkRbG^!bk1e@-RV0<3tMzYt5@1QZGy zgEuwUAU3|zBKu8>u*o2aPbvt-_N>^W5uXm$`5+6R}{peC}N5}KHA;MOBx~Hc6KRY#U9wTc4%Wpg$fq(%7l1-5A-K<+vjZE x-(#^s_r*7|1TTiI>O)dpcvp%$4(%{`a})cocM`v$Z@_$?T=!l-eULs({{i+nt7ZTI literal 0 HcmV?d00001 diff --git a/src/djangodemo/settings.py b/src/djangodemo/settings.py new file mode 100644 index 0000000000..89f15e152a --- /dev/null +++ b/src/djangodemo/settings.py @@ -0,0 +1,124 @@ +""" +Django settings for djangodemo project. + +Generated by 'django-admin startproject' using Django 2.1.7. + +For more information on this file, see +https://docs.djangoproject.com/en/2.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/2.1/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__))) +print(BASE_DIR) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '9&@2ap=&gar1dbz3*pcbt%@b3ns$%o1+fhfpe1(lucsv-x211g' + +# 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', + + "profiles", + "pages" +] + +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 = 'djangodemo.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 = 'djangodemo.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/2.1/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.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/2.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/2.1/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/src/djangodemo/urls.py b/src/djangodemo/urls.py new file mode 100644 index 0000000000..f2fadb92db --- /dev/null +++ b/src/djangodemo/urls.py @@ -0,0 +1,25 @@ +"""djangodemo URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/2.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 + +from pages.views import home_view + +urlpatterns = [ + path("", home_view, name="home"), + path('admin/', admin.site.urls), + +] diff --git a/src/djangodemo/wsgi.py b/src/djangodemo/wsgi.py new file mode 100644 index 0000000000..03c2e748ee --- /dev/null +++ b/src/djangodemo/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for djangodemo 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.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangodemo.settings') + +application = get_wsgi_application()