From 012a8511a3240c9082c26074eb2a063cdb64008f Mon Sep 17 00:00:00 2001 From: Alexandr Krainukov Date: Thu, 22 Feb 2024 14:59:57 +0300 Subject: [PATCH] Init --- .idea/Financer.iml | 30 +++++ .idea/inspectionProfiles/Project_Default.xml | 51 +++++++ .../inspectionProfiles/profiles_settings.xml | 6 + .idea/misc.xml | 7 + .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 + .idea/workspace.xml | 102 ++++++++++++++ Financer/__init__.py | 0 Financer/asgi.py | 16 +++ Financer/settings.py | 125 ++++++++++++++++++ Financer/urls.py | 22 +++ Financer/wsgi.py | 16 +++ FinancerApp/__init__.py | 0 FinancerApp/admin.py | 3 + FinancerApp/apps.py | 6 + FinancerApp/migrations/__init__.py | 0 FinancerApp/models.py | 3 + FinancerApp/tests.py | 3 + FinancerApp/views.py | 3 + manage.py | 22 +++ 20 files changed, 429 insertions(+) create mode 100644 .idea/Financer.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 Financer/__init__.py create mode 100644 Financer/asgi.py create mode 100644 Financer/settings.py create mode 100644 Financer/urls.py create mode 100644 Financer/wsgi.py create mode 100644 FinancerApp/__init__.py create mode 100644 FinancerApp/admin.py create mode 100644 FinancerApp/apps.py create mode 100644 FinancerApp/migrations/__init__.py create mode 100644 FinancerApp/models.py create mode 100644 FinancerApp/tests.py create mode 100644 FinancerApp/views.py create mode 100755 manage.py diff --git a/.idea/Financer.iml b/.idea/Financer.iml new file mode 100644 index 0000000..4371494 --- /dev/null +++ b/.idea/Financer.iml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..352a33d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,51 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..e9cf881 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f534d8d --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..2ddad63 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + "associatedIndex": 2 +} + + + + + + + + + + + + + + + + + + + + + 1708602991206 + + + + + + \ No newline at end of file diff --git a/Financer/__init__.py b/Financer/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Financer/asgi.py b/Financer/asgi.py new file mode 100644 index 0000000..68173f6 --- /dev/null +++ b/Financer/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for Financer 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.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Financer.settings') + +application = get_asgi_application() diff --git a/Financer/settings.py b/Financer/settings.py new file mode 100644 index 0000000..1373a8e --- /dev/null +++ b/Financer/settings.py @@ -0,0 +1,125 @@ +""" +Django settings for Financer project. + +Generated by 'django-admin startproject' using Django 5.0.2. + +For more information on this file, see +https://docs.djangoproject.com/en/5.0/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/5.0/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.0/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-qk5&w$dyj+b5k(&thg9#9(7mtl=v(u97p*0&hzsq4c)%drd+$6' + +# 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', + 'FinancerApp.apps.FinancerappConfig', +] + +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 = 'Financer.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [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 = 'Financer.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/5.0/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/5.0/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.0/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.0/howto/static-files/ + +STATIC_URL = 'static/' + +# Default primary key field type +# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/Financer/urls.py b/Financer/urls.py new file mode 100644 index 0000000..2330b73 --- /dev/null +++ b/Financer/urls.py @@ -0,0 +1,22 @@ +""" +URL configuration for Financer project. + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/5.0/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/Financer/wsgi.py b/Financer/wsgi.py new file mode 100644 index 0000000..5b687b2 --- /dev/null +++ b/Financer/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for Financer 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.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Financer.settings') + +application = get_wsgi_application() diff --git a/FinancerApp/__init__.py b/FinancerApp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/FinancerApp/admin.py b/FinancerApp/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/FinancerApp/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/FinancerApp/apps.py b/FinancerApp/apps.py new file mode 100644 index 0000000..01dafc1 --- /dev/null +++ b/FinancerApp/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class FinancerappConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'FinancerApp' diff --git a/FinancerApp/migrations/__init__.py b/FinancerApp/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/FinancerApp/models.py b/FinancerApp/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/FinancerApp/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/FinancerApp/tests.py b/FinancerApp/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/FinancerApp/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/FinancerApp/views.py b/FinancerApp/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/FinancerApp/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..8f077da --- /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', 'Financer.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()