From 586b0cc321d94c74fc5ef771accc55ad376e3f62 Mon Sep 17 00:00:00 2001 From: behruz-dev Date: Sat, 15 Nov 2025 21:33:06 +0500 Subject: [PATCH] initial commit --- .gitignore | 266 +++++++++++++++++++++++ apps/accounts/__init__.py | 0 apps/accounts/admin.py | 3 + apps/accounts/apps.py | 6 + apps/accounts/migrations/__init__.py | 0 apps/accounts/models.py | 3 + apps/accounts/tests.py | 3 + apps/accounts/views.py | 3 + apps/counterparty/__init__.py | 0 apps/counterparty/admin.py | 3 + apps/counterparty/apps.py | 6 + apps/counterparty/migrations/__init__.py | 0 apps/counterparty/models.py | 3 + apps/counterparty/tests.py | 3 + apps/counterparty/views.py | 3 + apps/finance/__init__.py | 0 apps/finance/admin.py | 3 + apps/finance/apps.py | 6 + apps/finance/migrations/__init__.py | 0 apps/finance/models.py | 3 + apps/finance/tests.py | 3 + apps/finance/views.py | 3 + apps/orders/__init__.py | 0 apps/orders/admin.py | 3 + apps/orders/apps.py | 6 + apps/orders/migrations/__init__.py | 0 apps/orders/models.py | 3 + apps/orders/tests.py | 3 + apps/orders/views.py | 3 + apps/products/__init__.py | 0 apps/products/admin.py | 3 + apps/products/apps.py | 6 + apps/products/migrations/__init__.py | 0 apps/products/models.py | 3 + apps/products/tests.py | 3 + apps/products/views.py | 3 + apps/projects/__init__.py | 0 apps/projects/admin.py | 3 + apps/projects/apps.py | 6 + apps/projects/migrations/__init__.py | 0 apps/projects/models.py | 3 + apps/projects/tests.py | 3 + apps/projects/views.py | 3 + apps/shared/__init__.py | 0 apps/shared/admin.py | 3 + apps/shared/apps.py | 6 + apps/shared/migrations/__init__.py | 0 apps/shared/models.py | 3 + apps/shared/tests.py | 3 + apps/shared/views.py | 3 + apps/warehouse/__init__.py | 0 apps/warehouse/admin.py | 3 + apps/warehouse/apps.py | 6 + apps/warehouse/migrations/__init__.py | 0 apps/warehouse/models.py | 3 + apps/warehouse/tests.py | 3 + apps/warehouse/views.py | 3 + config/__init__.py | 0 config/asgi.py | 16 ++ config/settings.py | 122 +++++++++++ config/urls.py | 22 ++ config/wsgi.py | 16 ++ docker-compose.yaml | 0 manage.py | 22 ++ 64 files changed, 608 insertions(+) create mode 100644 .gitignore create mode 100644 apps/accounts/__init__.py create mode 100644 apps/accounts/admin.py create mode 100644 apps/accounts/apps.py create mode 100644 apps/accounts/migrations/__init__.py create mode 100644 apps/accounts/models.py create mode 100644 apps/accounts/tests.py create mode 100644 apps/accounts/views.py create mode 100644 apps/counterparty/__init__.py create mode 100644 apps/counterparty/admin.py create mode 100644 apps/counterparty/apps.py create mode 100644 apps/counterparty/migrations/__init__.py create mode 100644 apps/counterparty/models.py create mode 100644 apps/counterparty/tests.py create mode 100644 apps/counterparty/views.py create mode 100644 apps/finance/__init__.py create mode 100644 apps/finance/admin.py create mode 100644 apps/finance/apps.py create mode 100644 apps/finance/migrations/__init__.py create mode 100644 apps/finance/models.py create mode 100644 apps/finance/tests.py create mode 100644 apps/finance/views.py create mode 100644 apps/orders/__init__.py create mode 100644 apps/orders/admin.py create mode 100644 apps/orders/apps.py create mode 100644 apps/orders/migrations/__init__.py create mode 100644 apps/orders/models.py create mode 100644 apps/orders/tests.py create mode 100644 apps/orders/views.py create mode 100644 apps/products/__init__.py create mode 100644 apps/products/admin.py create mode 100644 apps/products/apps.py create mode 100644 apps/products/migrations/__init__.py create mode 100644 apps/products/models.py create mode 100644 apps/products/tests.py create mode 100644 apps/products/views.py create mode 100644 apps/projects/__init__.py create mode 100644 apps/projects/admin.py create mode 100644 apps/projects/apps.py create mode 100644 apps/projects/migrations/__init__.py create mode 100644 apps/projects/models.py create mode 100644 apps/projects/tests.py create mode 100644 apps/projects/views.py create mode 100644 apps/shared/__init__.py create mode 100644 apps/shared/admin.py create mode 100644 apps/shared/apps.py create mode 100644 apps/shared/migrations/__init__.py create mode 100644 apps/shared/models.py create mode 100644 apps/shared/tests.py create mode 100644 apps/shared/views.py create mode 100644 apps/warehouse/__init__.py create mode 100644 apps/warehouse/admin.py create mode 100644 apps/warehouse/apps.py create mode 100644 apps/warehouse/migrations/__init__.py create mode 100644 apps/warehouse/models.py create mode 100644 apps/warehouse/tests.py create mode 100644 apps/warehouse/views.py create mode 100644 config/__init__.py create mode 100644 config/asgi.py create mode 100644 config/settings.py create mode 100644 config/urls.py create mode 100644 config/wsgi.py create mode 100644 docker-compose.yaml create mode 100755 manage.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b6350f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,266 @@ +# Created by https://www.toptal.com/developers/gitignore/api/python,django +# Edit at https://www.toptal.com/developers/gitignore?templates=python,django + +### Django ### +*.log +*.pot +*.pyc +__pycache__/ +local_settings.py +db.sqlite3 +db.sqlite3-journal +resources/media +resources/static +# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/ +# in your Git repository. Update and uncomment the following line accordingly. +# /staticfiles/ + +### Django.Python Stack ### +# Byte-compiled / optimized / DLL files +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo + +# Django stuff: + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +.idea/ + +### Python ### +# Byte-compiled / optimized / DLL files + +# C extensions + +# Distribution / packaging + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. + +# Installer logs + +# Unit test / coverage reports + +# Translations + +# Django stuff: + +# Flask stuff: + +# Scrapy stuff: + +# Sphinx documentation + +# PyBuilder + +# Jupyter Notebook + +# IPython + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm + +# Celery stuff + +# SageMath parsed files + +# Environments + +# Spyder project settings + +# Rope project settings + +# mkdocs documentation + +# mypy + +# Pyre type checker + +# pytype static type analyzer + +# Cython debug symbols + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. + +### Python Patch ### +# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration +poetry.toml + +# ruff +.ruff_cache/ + +# LSP config files +pyrightconfig.json + +# End of https://www.toptal.com/developers/gitignore/api/python,django \ No newline at end of file diff --git a/apps/accounts/__init__.py b/apps/accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/accounts/admin.py b/apps/accounts/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/apps/accounts/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/accounts/apps.py b/apps/accounts/apps.py new file mode 100644 index 0000000..3e3c765 --- /dev/null +++ b/apps/accounts/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AccountsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'accounts' diff --git a/apps/accounts/migrations/__init__.py b/apps/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/accounts/models.py b/apps/accounts/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/apps/accounts/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/apps/accounts/tests.py b/apps/accounts/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/apps/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/accounts/views.py b/apps/accounts/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/apps/accounts/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/apps/counterparty/__init__.py b/apps/counterparty/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/counterparty/admin.py b/apps/counterparty/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/apps/counterparty/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/counterparty/apps.py b/apps/counterparty/apps.py new file mode 100644 index 0000000..328eba7 --- /dev/null +++ b/apps/counterparty/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class CounterpartyConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'counterparty' diff --git a/apps/counterparty/migrations/__init__.py b/apps/counterparty/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/counterparty/models.py b/apps/counterparty/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/apps/counterparty/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/apps/counterparty/tests.py b/apps/counterparty/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/apps/counterparty/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/counterparty/views.py b/apps/counterparty/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/apps/counterparty/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/apps/finance/__init__.py b/apps/finance/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/finance/admin.py b/apps/finance/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/apps/finance/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/finance/apps.py b/apps/finance/apps.py new file mode 100644 index 0000000..53023d8 --- /dev/null +++ b/apps/finance/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class FinanceConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'finance' diff --git a/apps/finance/migrations/__init__.py b/apps/finance/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/finance/models.py b/apps/finance/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/apps/finance/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/apps/finance/tests.py b/apps/finance/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/apps/finance/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/finance/views.py b/apps/finance/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/apps/finance/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/apps/orders/__init__.py b/apps/orders/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/orders/admin.py b/apps/orders/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/apps/orders/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/orders/apps.py b/apps/orders/apps.py new file mode 100644 index 0000000..8ae0375 --- /dev/null +++ b/apps/orders/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class OrdersConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'orders' diff --git a/apps/orders/migrations/__init__.py b/apps/orders/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/orders/models.py b/apps/orders/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/apps/orders/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/apps/orders/tests.py b/apps/orders/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/apps/orders/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/orders/views.py b/apps/orders/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/apps/orders/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/apps/products/__init__.py b/apps/products/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/products/admin.py b/apps/products/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/apps/products/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/products/apps.py b/apps/products/apps.py new file mode 100644 index 0000000..145a2ac --- /dev/null +++ b/apps/products/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ProductsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'products' diff --git a/apps/products/migrations/__init__.py b/apps/products/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/products/models.py b/apps/products/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/apps/products/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/apps/products/tests.py b/apps/products/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/apps/products/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/products/views.py b/apps/products/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/apps/products/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/apps/projects/__init__.py b/apps/projects/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/projects/admin.py b/apps/projects/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/apps/projects/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/projects/apps.py b/apps/projects/apps.py new file mode 100644 index 0000000..afae498 --- /dev/null +++ b/apps/projects/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ProjectsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'projects' diff --git a/apps/projects/migrations/__init__.py b/apps/projects/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/projects/models.py b/apps/projects/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/apps/projects/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/apps/projects/tests.py b/apps/projects/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/apps/projects/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/projects/views.py b/apps/projects/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/apps/projects/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/apps/shared/__init__.py b/apps/shared/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/shared/admin.py b/apps/shared/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/apps/shared/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/shared/apps.py b/apps/shared/apps.py new file mode 100644 index 0000000..87efe00 --- /dev/null +++ b/apps/shared/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class SharedConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'shared' diff --git a/apps/shared/migrations/__init__.py b/apps/shared/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/shared/models.py b/apps/shared/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/apps/shared/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/apps/shared/tests.py b/apps/shared/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/apps/shared/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/shared/views.py b/apps/shared/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/apps/shared/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/apps/warehouse/__init__.py b/apps/warehouse/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/warehouse/admin.py b/apps/warehouse/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/apps/warehouse/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/apps/warehouse/apps.py b/apps/warehouse/apps.py new file mode 100644 index 0000000..06c4968 --- /dev/null +++ b/apps/warehouse/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class WarehouseConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'warehouse' diff --git a/apps/warehouse/migrations/__init__.py b/apps/warehouse/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/warehouse/models.py b/apps/warehouse/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/apps/warehouse/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/apps/warehouse/tests.py b/apps/warehouse/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/apps/warehouse/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/apps/warehouse/views.py b/apps/warehouse/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/apps/warehouse/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/config/__init__.py b/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/config/asgi.py b/config/asgi.py new file mode 100644 index 0000000..ed7c431 --- /dev/null +++ b/config/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for config 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/5.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + +application = get_asgi_application() diff --git a/config/settings.py b/config/settings.py new file mode 100644 index 0000000..c5c5817 --- /dev/null +++ b/config/settings.py @@ -0,0 +1,122 @@ +""" +Django settings for config project. + +Generated by 'django-admin startproject' using Django 5.2. + +For more information on this file, see +https://docs.djangoproject.com/en/5.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.2/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/5.2/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-ne#+mtd4hanhi!j%aov$%4e_*^kp^bs+oqv38!t83f20%w5u5-' + +# 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 = 'config.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'config.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.2/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.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/5.2/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/5.2/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/config/urls.py b/config/urls.py new file mode 100644 index 0000000..35a0802 --- /dev/null +++ b/config/urls.py @@ -0,0 +1,22 @@ +""" +URL configuration for config project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/5.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 path + +urlpatterns = [ + path('admin/', admin.site.urls), +] diff --git a/config/wsgi.py b/config/wsgi.py new file mode 100644 index 0000000..e2fbd58 --- /dev/null +++ b/config/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for config 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/5.2/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings') + +application = get_wsgi_application() diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..e69de29 diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..8e7ac79 --- /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', 'config.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()