work splash-screen

This commit is contained in:
erjemin
2021-07-23 23:10:33 +03:00
commit 0ac496386c
67 changed files with 1153 additions and 0 deletions

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

16
cadpoint/cadpoint/asgi.py Normal file
View File

@@ -0,0 +1,16 @@
"""
ASGI config for cadpoint 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/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cadpoint.settings')
application = get_asgi_application()

View File

@@ -0,0 +1,245 @@
"""
Django settings for cadpoint project.
Generated by 'django-admin startproject' using Django 3.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib import Path
from cadpoint.my_secret import *
import socket
# 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/3.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = MY_SECRET_KEY
# SECURITY WARNING: don't run with debug turned on in production!
if socket.gethostname() == MY_HOST_HOME:
DEBUG = True
else:
# Все остальные хосты (подразумевается продакшн)
DEBUG = False
ALLOWED_HOSTS = [
'127.0.0.1',
'localhost',
'192.168.1.30', # разработка домашний
'10.10.5.6', # разработка офис
'cadpoint.ru', # продакшн хостинг
'www.cadpoint.ru', # продакшн хостинг
]
#########################################
# Настройки сообщений об ошибках когда все упало и т.п.
ADMINS = (
('S.Erjemin', 'erjemin@gmail.com'),
)
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# 'easy_thumbnails',
# 'filer.apps.FilerConfig',
# 'mptt.apps.MpttConfig',
# # 'ckeditor_uploader',
# 'ckeditor',
'web.apps.WebConfig',
]
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 = 'cadpoint.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 = 'cadpoint.wsgi.application'
# Password validation
# https://docs.djangoproject.com/en/3.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/3.2/topics/i18n/
LANGUAGE_CODE = 'ru-RU' # <--------- RUSSIAN
# TIME_ZONE = 'Etc/GMT+3' #
TIME_ZONE = 'Europe/Moscow' #
USE_I18N = True
USE_L10N = True
USE_TZ = True # учитывать часовой пояс
FIRST_DAY_OF_WEEK = 1 # неделя начинается с понедельника
DEFAULT_CHARSET = 'utf-8'
# настройки THUMBNAIL (батарейка по созданию превьюшек)
THUMBNAIL_HIGH_RESOLUTION = True # Для easy_thumbnails поддержки retina-дисплеев (MacBooks, iOS и т.п.)
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
#'easy_thumbnails.processors.scale_and_crop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters',
)
THUMBNAIL_ALIASES = {
'': {
'x64': {'size': (64, 64), 'crop': True},
'x680': {'size': (680, 680), 'crop': True},
'x1140': {'size': (1140, 1140), 'crop': True},
},
}
THUMBNAIL_QUALITY = 85
THUMBNAIL_TRANSPARENCY_EXTENSION = 'png'
THUMBNAIL_WIDGET_OPTIONS = {'size': (64, 64)}
CKEDITOR_UPLOAD_PATH = "uploads/"
CKEDITOR_BASEPATH = "/static/ckeditor/ckeditor/"
CKEDITOR_FILENAME_GENERATOR = 'utils.get_filename'
# конфигуратор ckeditor https://ckeditor.com/latest/samples/toolbarconfigurator/index.html#basic
CKEDITOR_CONFIGS = {
'default': {
'toolbar_mini': [
{'name': 'document', 'items': ['Source', '-', ]},
{'name': 'basicstyles', 'items': ['Bold', 'Italic', 'Underline', 'NumberedList', 'BulletedList',
'Format', '-', 'RemoveFormat']},
{'name': 'my_custom_tools', 'items': ['Preview', 'Maximize']},
],
'toolbar': 'mini', # put selected toolbar config here
'height': '110',
'toolbarCanCollapse': True,
},
'fine': {
'toolbar_fine': [
{'name': 'document', 'items': ['Source', '-' ]},
{'name': 'clipboard', 'items': ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo']},
{'name': 'basicstyles',
'items': ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat']},
{'name': 'my_custom_tools', 'items': ['Preview', 'Maximize']},
'/',
{'name': 'paragraph',
'items': ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-',
'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'Styles', 'Format', 'Iframe']},
{'name': 'links', 'items': ['Link', 'Unlink', 'Anchor']},
{'name': 'insert', 'items': ['Image', 'Table', 'HorizontalRule', 'SpecialChar']},
],
'toolbar': 'fine',
# 'removeButtons': 'Save,NewPage,ExportPdf,Preview,Print,Templates,Find,Replace,SelectAll,Scayt,Form,'
# 'Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Format,'
# 'Font,FontSize,Maximize,ShowBlocks,About,Styles,Flash,Smiley,PageBreak,Iframe,BidiLtr,'
# 'BidiRtl,Language,JustifyBlock,JustifyRight,JustifyCenter,JustifyLeft,Indent,Outdent,'
# 'Strike,TextColor,BGColor,
'toolbarCanCollapse': True,
# 'extraPlugins': 'filer',
# 'editor': [
# {'name': 'filebrowserBrowseUrl', 'items': ''},
# {'name': 'filebrowserUploadUrl', 'items': ''},
# ],
},
}
FILER_SUBJECT_LOCATION_IMAGE_DEBUG = True
FILER_CANONICAL_URL = 'sharing/'
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
if DEBUG: # DEBUG: заменяем настройки прода, на настройки девопа
MEDIA_ROOT = MY_MEDIA_ROOT_DEV
# STATIC_ROOT = MY_STATIC_ROOT_DEV1
STATICFILES_DIRS = [MY_STATIC_ROOT_DEV, ]
#########################################
# настройки для почтового сервера
EMAIL_HOST = MY_EMAIL_HOST_DEV # SMTP server
EMAIL_PORT = MY_EMAIL_PORT_DEV # для SSL/https
EMAIL_HOST_USER = MY_EMAIL_HOST_USER_DEV # login or ''
EMAIL_HOST_PASSWORD = MY_EMAIL_HOST_PASSWORD_DEV # password
EMAIL_FROM = MY_EMAIL_FROM_DEV # мейл, от имени которого отправляются письма
DATABASES = {
'default': {
'ENGINE': "django.db.backends.mysql",
'HOST': MY_DATABASE_HOST_DEV, # Set to "" for localhost. Not used with sqlite3.
'PORT': MY_DATABASE_PORT_DEV, # Set to "" for default. Not used with sqlite3.
'NAME': MY_DATABASE_NAME_DEV, # Not used with sqlite3.
'USER': MY_DATABASE_USER_DEV, # Not used with sqlite3.
'PASSWORD': MY_DATABASE_PASSWORD_DEV, # Not used with sqlite3.
# 'OPTIONS': { 'autocommit': True, }
}
}
else:
MEDIA_ROOT = MY_MEDIA_ROOT_PROD
STATIC_ROOT = MY_STATIC_ROOT_PROD
# STATICFILES_DIRS = [MY_STATIC_ROOT_PROD1, ]
#########################################
# настройки для почтового сервера
EMAIL_HOST = MY_EMAIL_HOST_PROD # SMTP server
EMAIL_PORT = MY_EMAIL_PORT_PROD # для SSL/https
EMAIL_HOST_USER = MY_EMAIL_HOST_USER_PROD # login or ''
EMAIL_HOST_PASSWORD = MY_EMAIL_HOST_PASSWORD_PROD # password
EMAIL_FROM = MY_EMAIL_FROM_PROD # мейл, от имени которого отправляются письма
DATABASES = {
'default': {
'ENGINE': "django.db.backends.mysql",
'HOST': MY_DATABASE_HOST_PROD, # Set to "" for localhost. Not used with sqlite3.
'PORT': MY_DATABASE_PORT_PROD, # Set to "" for default. Not used with sqlite3.
'NAME': MY_DATABASE_NAME_PROD, # Not used with sqlite3.
'USER': MY_DATABASE_USER_PROD, # Not used with sqlite3.
'PASSWORD': MY_DATABASE_PASSWORD_PROD, # Not used with sqlite3.
# 'OPTIONS': { 'autocommit': True, }
}
}
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

35
cadpoint/cadpoint/urls.py Normal file
View File

@@ -0,0 +1,35 @@
"""cadpoint URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.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
from django.conf.urls.static import static
from cadpoint import settings
from django.conf.urls import url, include
from web import views
urlpatterns = [
path('admin/', admin.site.urls),
url(r'^$', views.index),
]
handler404 = 'web.views.handler404'
handler500 = 'web.views.handler500'
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

16
cadpoint/cadpoint/wsgi.py Normal file
View File

@@ -0,0 +1,16 @@
"""
WSGI config for cadpoint 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/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cadpoint.settings')
application = get_wsgi_application()

22
cadpoint/manage.py Normal file
View File

@@ -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', 'cadpoint.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()

Binary file not shown.

View File

@@ -0,0 +1,5 @@
asgiref==3.4.1
Django==3.2.5
mysqlclient @ file:///M:/cloud-mail.ru/PRJ/PRJ_CADpoint2/mysqlclient-1.4.6-cp39-cp39-win_amd64.whl
pytz==2021.1
sqlparse==0.4.1

View File

@@ -0,0 +1,5 @@
asgiref==3.4.1
Django==3.2.5
mysqlclient==2.0.3
pytz==2021.1
sqlparse==0.4.1

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="ru" />
<meta name="generator" content="Microsoft FrontPage 1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="cadpoint.ru - http 404 error" />
<meta name="keywords" content="cadpoint.ru - http 404 error" />
<meta name="copyright" lang="ru" content="Sergei Erjemin" />
<meta name="robots" content="noindex,nofollow" />
<meta name="document-state" content="Static" />
<meta name="generator" content="handcraft" />
<title>CADpoint.ru - http 404 error</title>
<meta name="theme-color" content="#F5F5F5" />
<link rel="icon" type="image/svg+xml" href="/static/svgs/favicon.svg" />
<link rel="icon" type="image/png" href="/static/img/favicon.png" />
<link rel="shortcut icon" type="image/x-icon" href="/static/img/favicon.ico" />
</head>
<body>
<div style="width:100%;height:80%;display:table;position:absolute;top:0;left:0;">
<div style="display:table-cell;text-align:center;vertical-align:middle;">
<div style="display:inline-block;">
<img src="/static/svgs/404-error.svg"
width="80%" alt="cadpoint.ru - http 404 error" />
<pre>попробуйте начать просмотр сайта <a href="/">с главной страницы...</a></pre>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="ru" />
<meta name="generator" content="Microsoft FrontPage 1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="cadpoint.ru - http 500 error" />
<meta name="keywords" content="cadpoint.ru - http 500 error" />
<meta name="copyright" lang="ru" content="Sergei Erjemin" />
<meta name="robots" content="noindex,nofollow" />
<meta name="document-state" content="Static" />
<meta name="generator" content="handcraft" />
<title>CADpoint.ru - http 500 error</title>
<meta name="theme-color" content="#F5F5F5" />
<link rel="icon" type="image/svg+xml" href="/static/svgs/favicon.svg" />
<link rel="icon" type="image/png" href="/static/img/favicon.png" />
<link rel="shortcut icon" type="image/x-icon" href="/static/img/favicon.ico" />
</head>
<body>
<div style="width:100%;height:80%;display:table;position:absolute;top:0;left:0;">
<div style="display:table-cell;text-align:center;vertical-align:middle;">
<div style="display:inline-block;">
<img src="/static/svgs/500-error.svg" alt="cadpoint.ru - http 500 error" style="width: 80vw;" />
<pre>подождите, скоро все починят...</pre>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,43 @@
<!DOCTYPE html>
{% load static %}<html lang="ru">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="ru" />
<meta http-equiv="Date" content="{% block Date4Meta %}{% now 'c' %}{% endblock %}" />
<meta http-equiv="Last-Modified" content="{% block Last4Meta %}{% now 'c' %}{% endblock %}" />
<meta http-equiv="Expires" content="{% block Expires4Meta %}{% now 'c' %}{% endblock %}" />
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="generator" content="Microsoft FrontPage 1.0" />
<meta name="viewport" content="width=device-width, initial-scale=0.5" />
<meta name="description" content="{% block Description %}{% endblock %}" />
<meta name="keywords" content="{% block Keywords %}{% endblock %}" />
<meta name="copyright" lang="ru" content="Sergei Erjemin{% block CopyrightAuthor4Meta %}{% endblock %}." />
<meta name="robots" content="index,follow" />
<meta name="document-state" content="{{ META_DOCUMENT_STATE|default:'Dynamic' }}" />
<meta name="generator" content="CADPOINT.RU-- 0.01β by Python/Django" />
<meta name="format-detection" content="telephone=no" />
<meta name="twitter:dnt" content="on" />
<title>CADPOINT.RU: {% block Title %}{% endblock %}</title>
<link rel="canonical" href="{% block canonical %}https://cadpoint.ru{% endblock %}">{% comment %}
<!-- Favicons -->{% endcomment %}
<meta name="theme-color" content="#F5F5F5" />{% comment %}theme-color предоставляет браузерам цвет CSS для
настройки отображения страницы или окружающего пользовательского интерфейса.{% endcomment %}
<link rel="icon" type="image/svg+xml" href="{% static 'svgs/favicon.svg' %}" />
<link rel="icon" type="image/png" href="{% static 'img/favicon.png' %}" />
<link rel="shortcut icon" type="image/x-icon" href="{% static 'img/favicon.ico' %}" />
<link rel="apple-touch-icon" href="{% static 'img/favicon.png' %}" />{% comment %}
<!-- css -->{% endcomment %}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous" />
<link rel="stylesheet" href="{% static 'css/all.min.css' %}" />
<link rel="stylesheet" href="{% static 'css/cadpoint.css' %}" />{% block META_OG %}{% endblock %}
</head>
<body>{% block BODY %}
{% block Top_CSS1 %}{% endblock %}{% block Top_CSS2 %}{% endblock %}{% block Top_CSS3 %}{% endblock %}{% include "blocks/header_nav.jinja2" %}{% block CONTENT %}{% endblock %}
{# {% include "blocks/footer.jinja2" %}#}{% if COOKIES %}
{% include "blocks/accept-cookies.jinja2" %}{% endif %}
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
{% block Top_JS1 %}{% endblock %}{% block Top_JS2 %}{% endblock %}{% block Top_JS3 %}{% endblock %}
{% endblock %}</body>
</html>

View File

@@ -0,0 +1,15 @@
<!-- СОГЛАСИЕ НА КУКИ: НАЧАЛО -- соглашение о сборе технической информации -->
<noindex id="cookies_accept" class="fixed-bottom container-fluid">
<div class="row bg-dark text-white">
<div class="col p-4 mb-0 text-center">
<small>Тут используют cookie и&nbsp;ведут сбор технических данных о&nbsp;посещениях, потому как без этого <nobr>интернет-сайты</nobr> вообще почти не&nbsp;работают&hellip;</small>
<button onclick="CookieAcceptDate = new Date();
CookieAcceptDate.setTime(CookieAcceptDate.getTime() + 7948800000);
document.cookie = 'cookie_accept=yes;expires=' + CookieAcceptDate;
document.getElementById('cookies_accept').remove();"
class="btn ml-4 py-2 px-4 btn-warning">
Я согласен!
</button>
</div>
</div>
</noindex><!-- СОГЛАСИЕ НА КУКИ: КОНЕЦ -->

View File

@@ -0,0 +1,24 @@
{% load static %}{# <!-- ШАПКА: НАЧАЛО --> #}<header{# class="d-none d-sm-block"#}>
<nav class="navbar fixed-top navbar-expand py-0 shadow-lg">
<div class="container">
<a class="navbar-brand my-0" href="/"><img src="{% static 'svgs/logo_cadpoint-2021.svg' %}" alt="CADpoint.ru." title="На главную страницу" /></a>
<ul class="navbar-nav float-right">
<li class="nav-item"><a href="/tags">Теги</a></li>
<li class="nav-item d-none d-xl-block">
<form class="form-inline"><div class="input-group">
<input type="text" class="form-control form-control-sm" placeholder="Поиск по сайту" aria-label="Поиск по сайту">
<div class="input-group-append"><button class="input-group-text"><img src="{% static 'svgs/search-ico.svg' %}" title="Поиск" /></button ></div>
</div></form>
</li>
</ul>
</div>
</nav>
</header>
{# <!-- ШАПКА: КОНЕЦ --> #}{% comment %}
<!-- АЛЬТЕРНАТИВНАЯ ШАПКА ДЛЯ МОБИЛЬНЫХ: НАЧАЛО -->
<header class="rastopiir">
<nav class="container shadow-lg navbar d-sm-none py-0">
<a class="navbar-brand my-0 " href="/"><img src="{% static 'svgs/logo_cadpoint-2021.svg' %}" alt="CADpoint.ru." title="На главную страницу" /></a>
</nav>
</header>
<!-- АЛЬТЕРНАТИВНАЯ ШАПКА ДЛЯ МОБИЛЬНЫХ: КОНЕЦ -->{% endcomment %}

View File

@@ -0,0 +1,40 @@
{% extends "base.jinja2" %}{% load static %}
{% block META_OG %}{% comment %} РАЗМЕТКА Open Graph ДЛЯ СОЦ-СЕТЕЙ
подробности: https://habr.com/ru/company/macloud/blog/555082/{% endcomment %}
<meta property="og:title" content="Главная страница - RSVO.RU">{% comment %} Уникальное название страницы.
Используется парсерами URL-адресов в социальных сетях, таких как Twitter или Facebook{% endcomment %}
<meta property="og:description" content="RSVO.RU: Строительство и эксплуатация разноуровневых систем оповещения" />{% comment %} Уникальное описание страницы.
Используется парсерами URL-адресов в социальных сетях, таких как Twitter или Facebook.{% endcomment %}
<meta property="og:image" content="{% static 'img/og-cadpoint-default.png' %}" />{% comment %} Изображение, отображаемое, когда вы
делитесь ссылкой на страницу в социальных сетях, приложениях чата или других сайтах,
которые очищают URL-адреса.
В идеале это должно быть квадратное изображение с важным содержанием, размещенным
в центре квадрата в прямоугольнике с соотношением сторон 2:1. Это гарантирует,
что изображение будет хорошо смотреться на карточках с изображениями прямоугольной
и квадратной формы.{% endcomment %}
<meta property="og:image:alt" content="cadpint.ru: новости 3D-печати и Систем Автоматичекого Проектирования" />{% comment %}
Описание изображения.
Не используйте этот метатег, если изображение носит чисто декоративный характер
и не содержит значимой информации. Программы чтения с экрана игнорируют
изображение, если мы предоставлен замещающий текст.{% endcomment %}
<meta property="og:locale" content="ru_RU" />{% comment %} Естественный язык страницы.{% endcomment %}
<meta property="og:type" content="website" />{% comment %} Тип контента, которым вы делитесь,
например website, article, или video.movie{% endcomment %}
<meta property="og:url" content="https://cadpoiny.ru" />{% comment %} Канонический URL страницы.
Обязательное свойство для допустимых страниц Open Graph.{% endcomment %}
<meta name="twitter:card" content="summary_large_image" />{% comment %} определяет, как будут выглядеть
карточки при публикации в Twitter. Есть два варианта для веб-сайтов: summary
и summary_large_image{% endcomment %}{% endblock %}
<!--- ТИТУЛ --->
{% block Title %}Главная страница{% endblock %}
{% block Description %}ФГУП Российские сети вещания и оповещения: Строительство и эксплуатация разноуровневых систем оповещения{% endblock %}
{% block Keywords %}ФГУП РСВО, российские сети вещания и оповещения, системы оповещения{% endblock %}
{% block CONTENT %}
<h1><br /><br /><br /><br /><br /><br /><br /><br />ЛЯ-ЛЯ</h1>
{% endblock %}
{% block Top_JS1 %}<script type="text/javascript">
</script>{% endblock %}

View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="ru" />
<meta name="generator" content="Microsoft FrontPage 1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="cadpoint.ru - under reconstruction" />
<meta name="keywords" content="cadpoint.ru - under reconstruction" />
<meta name="copyright" lang="ru" content="Sergei Erjemin" />
<meta name="robots" content="noindex,nofollow" />
<meta name="document-state" content="Static" />
<meta name="generator" content="handcraft" />
<title>CADpoint.ru - http 500 error</title>
<meta name="theme-color" content="#F5F5F5" />
<link rel="icon" type="image/svg+xml" href="/static/svgs/favicon.svg" />
<link rel="icon" type="image/png" href="/static/img/favicon.png" />
<link rel="shortcut icon" type="image/x-icon" href="/static/img/favicon.ico" />
</head>
<body>
<div style="width:100%;height:80%;display:table;position:absolute;top:0;left:0;">
<div style="display:table-cell;text-align:center;vertical-align:middle;">
<div style="display:inline-block;">
<img src="/static/svgs/cappoint_under_reconstruction.svg"
alt="cadpoint.ru - under reconstruction" style="width: 80vw;"/>
<pre>сайт cadpoint.ru реконструируется... подождите, скоро все вся станет не так как прежде...</pre>
</div>
</div>
</div>
</body>
</html>

0
cadpoint/web/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from cadpoint.settings import *
def check_cookies(request) -> bool:
# проверка, что посетитель согласился со сбором данных через cookies
if request.COOKIES.get('cookie_accept'):
return False
return True

3
cadpoint/web/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
cadpoint/web/apps.py Normal file
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class WebConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'web'

View File

3
cadpoint/web/models.py Normal file
View File

@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

3
cadpoint/web/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

38
cadpoint/web/views.py Normal file
View File

@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
from django.shortcuts import render
from web.add_function import *
# Create your views here.
def handler404(request, exception: str) -> render:
""" Обработчик ошибки 404
:param request: http-запрос
:param exception: сообщение с причиной ошибки
:return: response: http-ответ
"""
response = render(request, "404.html", {"MSG": exception})
response.status_code = 404
return response
def handler500(request) -> render:
""" Обработчик ошибки 500
:param request:
:return: response:
"""
response = render(request, "500.html", {})
response.status_code = 500
return response
def index(request) -> render:
""" Главная страница
:param request:
:return: response:
"""
template = "index.jinja2" # шаблон
template = "under_reconstruction.jinja2" # шаблон
to_template = {"COOKIES": check_cookies(request)}
return render(request, template, to_template)