Skip to content

Commit 64d5980

Browse files
committed
project init
0 parents  commit 64d5980

File tree

8 files changed

+411
-0
lines changed

8 files changed

+411
-0
lines changed

.gitignore

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
### Django ###
2+
*.log
3+
*.pot
4+
*.pyc
5+
__pycache__/
6+
local_settings.py
7+
db.sqlite3
8+
db.sqlite3-journal
9+
media
10+
11+
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
12+
# in your Git repository. Update and uncomment the following line accordingly.
13+
# <django-project-name>/staticfiles/
14+
15+
### Django.Python Stack ###
16+
# Byte-compiled / optimized / DLL files
17+
*.py[cod]
18+
*$py.class
19+
20+
# C extensions
21+
*.so
22+
23+
# Distribution / packaging
24+
.Python
25+
build/
26+
develop-eggs/
27+
dist/
28+
downloads/
29+
eggs/
30+
.eggs/
31+
lib/
32+
lib64/
33+
parts/
34+
sdist/
35+
var/
36+
wheels/
37+
share/python-wheels/
38+
*.egg-info/
39+
.installed.cfg
40+
*.egg
41+
MANIFEST
42+
43+
# PyInstaller
44+
# Usually these files are written by a python script from a template
45+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
46+
*.manifest
47+
*.spec
48+
49+
# Installer logs
50+
pip-log.txt
51+
pip-delete-this-directory.txt
52+
53+
# Unit test / coverage reports
54+
htmlcov/
55+
.tox/
56+
.nox/
57+
.coverage
58+
.coverage.*
59+
.cache
60+
nosetests.xml
61+
coverage.xml
62+
*.cover
63+
*.py,cover
64+
.hypothesis/
65+
.pytest_cache/
66+
cover/
67+
68+
# Translations
69+
*.mo
70+
71+
# Django stuff:
72+
73+
# Flask stuff:
74+
instance/
75+
.webassets-cache
76+
77+
# Scrapy stuff:
78+
.scrapy
79+
80+
# Sphinx documentation
81+
docs/_build/
82+
83+
# PyBuilder
84+
.pybuilder/
85+
target/
86+
87+
# Jupyter Notebook
88+
.ipynb_checkpoints
89+
90+
# IPython
91+
profile_default/
92+
ipython_config.py
93+
94+
.pdm.toml
95+
96+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
97+
__pypackages__/
98+
99+
# Celery stuff
100+
celerybeat-schedule
101+
celerybeat.pid
102+
103+
# SageMath parsed files
104+
*.sage.py
105+
106+
# Environments
107+
.env
108+
.venv
109+
env/
110+
venv/
111+
ENV/
112+
env.bak/
113+
venv.bak/
114+
115+
# Spyder project settings
116+
.spyderproject
117+
.spyproject
118+
119+
# Rope project settings
120+
.ropeproject
121+
122+
# mkdocs documentation
123+
/site
124+
125+
# mypy
126+
.mypy_cache/
127+
.dmypy.json
128+
dmypy.json
129+
130+
# Pyre type checker
131+
.pyre/
132+
133+
# pytype static type analyzer
134+
.pytype/
135+
136+
# Cython debug symbols
137+
cython_debug/
138+
139+
### PyCharm+all ###
140+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
141+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
142+
143+
# User-specific stuff
144+
.idea/**/workspace.xml
145+
.idea/**/tasks.xml
146+
.idea/**/usage.statistics.xml
147+
.idea/**/dictionaries
148+
.idea/**/shelf
149+
150+
# AWS User-specific
151+
.idea/**/aws.xml
152+
153+
# Generated files
154+
.idea/**/contentModel.xml
155+
156+
# Sensitive or high-churn files
157+
.idea/**/dataSources/
158+
.idea/**/dataSources.ids
159+
.idea/**/dataSources.local.xml
160+
.idea/**/sqlDataSources.xml
161+
.idea/**/dynamic.xml
162+
.idea/**/uiDesigner.xml
163+
.idea/**/dbnavigator.xml
164+
165+
# Gradle
166+
.idea/**/gradle.xml
167+
.idea/**/libraries
168+
169+
# CMake
170+
cmake-build-*/
171+
172+
# Mongo Explorer plugin
173+
.idea/**/mongoSettings.xml
174+
175+
# File-based project format
176+
*.iws
177+
178+
# IntelliJ
179+
out/
180+
181+
# mpeltonen/sbt-idea plugin
182+
.idea_modules/
183+
184+
# JIRA plugin
185+
atlassian-ide-plugin.xml
186+
187+
# Cursive Clojure plugin
188+
.idea/replstate.xml
189+
190+
# SonarLint plugin
191+
.idea/sonarlint/
192+
193+
# Crashlytics plugin (for Android Studio and IntelliJ)
194+
com_crashlytics_export_strings.xml
195+
crashlytics.properties
196+
crashlytics-build.properties
197+
fabric.properties
198+
199+
# Editor-based Rest Client
200+
.idea/httpRequests
201+
202+
# Android studio 3.1+ serialized cache file
203+
.idea/caches/build_file_checksums.ser
204+
205+
### PyCharm+all Patch ###
206+
# Ignore everything but code style settings and run configurations
207+
# that are supposed to be shared within teams.
208+
209+
.idea/*
210+
211+
!.idea/codeStyles
212+
!.idea/runConfigurations

core/__init__.py

Whitespace-only changes.

core/asgi.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
ASGI config for core project.
3+
4+
It exposes the ASGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
8+
"""
9+
10+
import os
11+
12+
from django.core.asgi import get_asgi_application
13+
14+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
15+
16+
application = get_asgi_application()

core/settings.py

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
"""
2+
Django settings for core project.
3+
4+
Generated by 'django-admin startproject' using Django 4.2.4.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/4.2/topics/settings/
8+
9+
For the full list of settings and their values, see
10+
https://docs.djangoproject.com/en/4.2/ref/settings/
11+
"""
12+
13+
from pathlib import Path
14+
15+
# Build paths inside the project like this: BASE_DIR / 'subdir'.
16+
BASE_DIR = Path(__file__).resolve().parent.parent
17+
18+
19+
# Quick-start development settings - unsuitable for production
20+
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
21+
22+
# SECURITY WARNING: keep the secret key used in production secret!
23+
SECRET_KEY = "django-insecure-9&@b(4qv_t=ngzqq)7*z078db+5q=$4!*pv!n8nbp=518xez$8"
24+
25+
# SECURITY WARNING: don't run with debug turned on in production!
26+
DEBUG = True
27+
28+
ALLOWED_HOSTS = []
29+
30+
31+
# Application definition
32+
33+
INSTALLED_APPS = [
34+
"django.contrib.admin",
35+
"django.contrib.auth",
36+
"django.contrib.contenttypes",
37+
"django.contrib.sessions",
38+
"django.contrib.messages",
39+
"django.contrib.staticfiles",
40+
]
41+
42+
MIDDLEWARE = [
43+
"django.middleware.security.SecurityMiddleware",
44+
"django.contrib.sessions.middleware.SessionMiddleware",
45+
"django.middleware.common.CommonMiddleware",
46+
"django.middleware.csrf.CsrfViewMiddleware",
47+
"django.contrib.auth.middleware.AuthenticationMiddleware",
48+
"django.contrib.messages.middleware.MessageMiddleware",
49+
"django.middleware.clickjacking.XFrameOptionsMiddleware",
50+
]
51+
52+
ROOT_URLCONF = "core.urls"
53+
54+
TEMPLATES = [
55+
{
56+
"BACKEND": "django.template.backends.django.DjangoTemplates",
57+
"DIRS": [BASE_DIR / "templates"],
58+
"APP_DIRS": True,
59+
"OPTIONS": {
60+
"context_processors": [
61+
"django.template.context_processors.debug",
62+
"django.template.context_processors.request",
63+
"django.contrib.auth.context_processors.auth",
64+
"django.contrib.messages.context_processors.messages",
65+
],
66+
},
67+
},
68+
]
69+
70+
WSGI_APPLICATION = "core.wsgi.application"
71+
72+
73+
# Database
74+
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
75+
76+
DATABASES = {
77+
"default": {
78+
"ENGINE": "django.db.backends.sqlite3",
79+
"NAME": BASE_DIR / "db.sqlite3",
80+
}
81+
}
82+
83+
84+
# Password validation
85+
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators
86+
87+
AUTH_PASSWORD_VALIDATORS = [
88+
{
89+
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
90+
},
91+
{
92+
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
93+
},
94+
{
95+
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
96+
},
97+
{
98+
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
99+
},
100+
]
101+
102+
103+
# Internationalization
104+
# https://docs.djangoproject.com/en/4.2/topics/i18n/
105+
106+
LANGUAGE_CODE = "en-us"
107+
108+
TIME_ZONE = "UTC"
109+
110+
USE_I18N = True
111+
112+
USE_TZ = True
113+
114+
115+
# Static files (CSS, JavaScript, Images)
116+
# https://docs.djangoproject.com/en/4.2/howto/static-files/
117+
118+
STATIC_URL = "static/"
119+
120+
# Default primary key field type
121+
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
122+
123+
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

core/urls.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"""
2+
URL configuration for core project.
3+
4+
The `urlpatterns` list routes URLs to views. For more information please see:
5+
https://docs.djangoproject.com/en/4.2/topics/http/urls/
6+
Examples:
7+
Function views
8+
1. Add an import: from my_app import views
9+
2. Add a URL to urlpatterns: path('', views.home, name='home')
10+
Class-based views
11+
1. Add an import: from other_app.views import Home
12+
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
13+
Including another URLconf
14+
1. Import the include() function: from django.urls import include, path
15+
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
16+
"""
17+
from django.contrib import admin
18+
from django.urls import path
19+
20+
urlpatterns = [
21+
path("admin/", admin.site.urls),
22+
]

core/wsgi.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
WSGI config for core project.
3+
4+
It exposes the WSGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
8+
"""
9+
10+
import os
11+
12+
from django.core.wsgi import get_wsgi_application
13+
14+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings")
15+
16+
application = get_wsgi_application()

0 commit comments

Comments
 (0)