diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/REPORT_Kolomiets_Web_7_8.pdf" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/REPORT_Kolomiets_Web_7_8.pdf" new file mode 100644 index 000000000..b8971d4ce Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/REPORT_Kolomiets_Web_7_8.pdf" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/db.sqlite3" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/db.sqlite3" new file mode 100644 index 000000000..79bd27b5b Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/db.sqlite3" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/manage.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/manage.py" new file mode 100644 index 000000000..6a0e408ab --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/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', 'myproject.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/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__init__.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__init__.py" new file mode 100644 index 000000000..e69de29bb diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/__init__.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/__init__.cpython-310.pyc" new file mode 100644 index 000000000..754b836ea Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/__init__.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/settings.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/settings.cpython-310.pyc" new file mode 100644 index 000000000..886a9a822 Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/settings.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/urls.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/urls.cpython-310.pyc" new file mode 100644 index 000000000..c58f5fb02 Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/urls.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/wsgi.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/wsgi.cpython-310.pyc" new file mode 100644 index 000000000..c20325bb7 Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/__pycache__/wsgi.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/asgi.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/asgi.py" new file mode 100644 index 000000000..145862599 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/asgi.py" @@ -0,0 +1,16 @@ +""" +ASGI config for myproject 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', 'myproject.settings') + +application = get_asgi_application() diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/settings.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/settings.py" new file mode 100644 index 000000000..1bb5fb242 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/settings.py" @@ -0,0 +1,123 @@ +""" +Django settings for myproject project. + +Generated by 'django-admin startproject' using Django 5.2.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-4x&=r!%7#02exq*@!stzi_-1fvy74j7a#(bbe$wpgp(7lpa++d' + +# 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', + 'pages.apps.PagesConfig', +] + +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 = 'myproject.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 = 'myproject.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/' +STATICFILES_DIRS = [BASE_DIR / '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/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/urls.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/urls.py" new file mode 100644 index 000000000..a0e54ace6 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/urls.py" @@ -0,0 +1,24 @@ +""" +URL configuration for myproject 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, include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', include('pages.urls')), + +] \ No newline at end of file diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/wsgi.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/wsgi.py" new file mode 100644 index 000000000..14fe91a45 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/myproject/wsgi.py" @@ -0,0 +1,16 @@ +""" +WSGI config for myproject 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', 'myproject.settings') + +application = get_wsgi_application() diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__init__.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__init__.py" new file mode 100644 index 000000000..e69de29bb diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/__init__.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/__init__.cpython-310.pyc" new file mode 100644 index 000000000..9a4805d32 Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/__init__.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/admin.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/admin.cpython-310.pyc" new file mode 100644 index 000000000..ed7309b8a Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/admin.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/apps.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/apps.cpython-310.pyc" new file mode 100644 index 000000000..820e4fa49 Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/apps.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/models.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/models.cpython-310.pyc" new file mode 100644 index 000000000..2201feff2 Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/models.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/urls.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/urls.cpython-310.pyc" new file mode 100644 index 000000000..a720bbc2a Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/urls.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/views.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/views.cpython-310.pyc" new file mode 100644 index 000000000..5d9f462d4 Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/__pycache__/views.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/admin.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/admin.py" new file mode 100644 index 000000000..ecfd512d2 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/admin.py" @@ -0,0 +1,9 @@ +from django.contrib import admin +from .models import Feedback + +@admin.register(Feedback) +class FeedbackAdmin(admin.ModelAdmin): + list_display = ('name', 'email', 'created_at') + list_filter = ('created_at',) + search_fields = ('name', 'email', 'message') + readonly_fields = ('created_at',) \ No newline at end of file diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/apps.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/apps.py" new file mode 100644 index 000000000..8f83e40c3 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/apps.py" @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class PagesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'pages' diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/0001_initial.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/0001_initial.py" new file mode 100644 index 000000000..61245c82a --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/0001_initial.py" @@ -0,0 +1,29 @@ +# Generated by Django 5.2.2 on 2025-06-08 08:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Feedback', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100, verbose_name='Имя')), + ('email', models.EmailField(max_length=254, verbose_name='Email')), + ('message', models.TextField(verbose_name='Сообщение')), + ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Дата отправки')), + ], + options={ + 'verbose_name': 'обратная связь', + 'verbose_name_plural': 'обратные связи', + 'ordering': ['-created_at'], + }, + ), + ] diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/__init__.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/__init__.py" new file mode 100644 index 000000000..e69de29bb diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/__pycache__/0001_initial.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/__pycache__/0001_initial.cpython-310.pyc" new file mode 100644 index 000000000..2bc8b383d Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/__pycache__/0001_initial.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/__pycache__/__init__.cpython-310.pyc" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/__pycache__/__init__.cpython-310.pyc" new file mode 100644 index 000000000..b515e65ea Binary files /dev/null and "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/migrations/__pycache__/__init__.cpython-310.pyc" differ diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/models.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/models.py" new file mode 100644 index 000000000..64b364393 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/models.py" @@ -0,0 +1,15 @@ +from django.db import models + +class Feedback(models.Model): + name = models.CharField(max_length=100, verbose_name='Имя') + email = models.EmailField(verbose_name='Email') + message = models.TextField(verbose_name='Сообщение') + created_at = models.DateTimeField(auto_now_add=True, verbose_name='Дата отправки') + + class Meta: + verbose_name = 'обратная связь' + verbose_name_plural = 'обратные связи' + ordering = ['-created_at'] + + def __str__(self): + return f'Сообщение от {self.name}' \ No newline at end of file diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/templates/pages/about.html" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/templates/pages/about.html" new file mode 100644 index 000000000..a1f587544 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/templates/pages/about.html" @@ -0,0 +1,39 @@ +{% extends 'pages/base.html' %} + +{% block title %}О разработке проекта{% endblock %} + +{% block content %} +
Наша энциклопедия призвана:
+Динозавры - древние существа, которые властвовали на Земле более 160 миллионов лет, начиная с позднего триасового периода (около 230 млн лет назад) до конца мелового периода (около 65 млн лет назад). Эти удивительные создания представлены сотнями видов, от крошечных пернатых существ до гигантских ящеров.
+ +++ +Самый крупный известный динозавр - патаготитан, достигавший 37 метров в длину и весивший около 69 тонн. Для сравнения - это больше чем современный синий кит!
+
Современные исследования показали, что многие динозавры имели перья. Археоптерикс, долгое время считавшийся первой птицей, теперь классифицируется как пернатый динозавр.
+ +Основная теория - падение астероида около 66 миллионов лет назад. Катастрофа вызвала:
+ +Однако не все динозавры вымерли - современные птицы являются прямыми потомками тероподовых динозавров.
+ +Крупнейшие коллекции окаменелостей можно увидеть в:
+ +Изучение динозавров продолжается - ежегодно описываются десятки новых видов, что меняет наше понимание этих удивительных существ!
+{% endblock %} \ No newline at end of file diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/tests.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/tests.py" new file mode 100644 index 000000000..de8bdc00e --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/tests.py" @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/urls.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/urls.py" new file mode 100644 index 000000000..7032eaa1c --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/urls.py" @@ -0,0 +1,8 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.home, name='home'), + path('about/', views.about, name='about'), + path('contact/', views.contact, name='contact'), +] \ No newline at end of file diff --git "a/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/views.py" "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/views.py" new file mode 100644 index 000000000..2d5c9b0d0 --- /dev/null +++ "b/works/K3320/\320\232\320\276\320\273\320\276\320\274\320\270\320\265\321\206 \320\220\320\273\320\270\321\201\320\260 \320\224\320\265\320\275\320\270\321\201\320\276\320\262\320\275\320\260/lab7-8/pages/views.py" @@ -0,0 +1,26 @@ +from django.shortcuts import render +from django.contrib import messages +from .models import Feedback + +def home(request): + return render(request, 'pages/home.html') + +def about(request): + return render(request, 'pages/about.html') + +def contact(request): + if request.method == 'POST': + name = request.POST.get('name') + email = request.POST.get('email') + message = request.POST.get('message') + + # Сохраняем данные в базу + Feedback.objects.create(name=name, email=email, message=message) + + # Добавляем сообщение об успехе + messages.success(request, 'Ваше сообщение успешно отправлено!') + + # Можно добавить перенаправление, чтобы избежать повторной отправки формы + # return redirect('contact') + + return render(request, 'pages/contact.html') \ No newline at end of file