del: служебный интерфейс удалён из проекта
This commit is contained in:
@@ -101,23 +101,19 @@ urlpatterns = [
|
|||||||
re_path(r'^specification_set/\d$', views.main_init), # заглушка (позже будет спецификация оконного набора)
|
re_path(r'^specification_set/\d$', views.main_init), # заглушка (позже будет спецификация оконного набора)
|
||||||
# отображение всех составлющих рейтинга
|
# отображение всех составлющих рейтинга
|
||||||
re_path( r'^show_rating_components/(?P<win_set>\d+)$', report1.show_rating_components),
|
re_path( r'^show_rating_components/(?P<win_set>\d+)$', report1.show_rating_components),
|
||||||
# СЛУЖЕБНЫЕ СТРАНИЦЫ (для администратора)
|
|
||||||
# --- страничка "главная сервис-утилит"
|
|
||||||
re_path(r'^service[/*]$', service.service),
|
|
||||||
# --- страничка для тестирования верстки текста в блоге
|
|
||||||
re_path(r'^service/tmp[/*]$', service.tmp),
|
|
||||||
# --- страничка "нет доступа"
|
|
||||||
re_path(r'^service/not-denice[/*]$', service.not_denice),
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
# Медиа-файлы
|
||||||
|
urlpatterns += static(MEDIA_URL, document_root=MEDIA_ROOT)
|
||||||
|
# --- страничка для тестирования верстки текста в блоге
|
||||||
|
urlpatterns += [re_path(r'^blog/tmp[/*]$', service.tmp),]
|
||||||
# ___ ____ _ _____ _ _ _____ _
|
# ___ ____ _ _____ _ _ _____ _
|
||||||
# | | | | \ ___| |_ _ _ ___ |_ _|___ ___| | |_ ___ ___ | _ |___ ___ ___| |
|
# | | | | \ ___| |_ _ _ ___ |_ _|___ ___| | |_ ___ ___ | _ |___ ___ ___| |
|
||||||
# |_ | | | | -_| . | | | . | | | | . | . | | . | .'| _| | __| .'| | -_| |
|
# |_ | | | | -_| . | | | . | | | | . | . | | . | .'| _| | __| .'| | -_| |
|
||||||
# |_| |____/|___|___|___|_ | |_| |___|___|_|___|__,|_| |__| |__,|_|_|___|_|
|
# |_| |____/|___|___|___|_ | |_| |___|___|_|___|__,|_| |__| |__,|_|_|___|_|
|
||||||
# |___|
|
# |___|
|
||||||
urlpatterns = [path('__debug__/', include('debug_toolbar.urls')), *urlpatterns]
|
urlpatterns = [path('__debug__/', include('debug_toolbar.urls')), *urlpatterns]
|
||||||
# Медиа-файлы
|
|
||||||
urlpatterns += static(MEDIA_URL, document_root=MEDIA_ROOT)
|
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="ru">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="robots" content="noindex, nofollow" />
|
|
||||||
<title>ОКНАРДИЯ :: Служебное</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>Служебные ссылки</h1>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li><b><a href="/service/tmp">Страница для тестирования верстки текста в блоге</a></b></li>
|
|
||||||
</ul><ul>
|
|
||||||
<li><a href="/service/make_JavaScripts4maps">Пересоздать JavaScript для карт на основе API Яндекс.Крат</a> (исполняется около 1 минуты)</li>
|
|
||||||
<li><a href="/service/make_SeriaInfoRoot">Построить id корневых серий</a> (исполняется около 1 часа)</li>
|
|
||||||
</ul><ul>
|
|
||||||
<li><a href="/service/make_FillGeoCode">Добавить GeoCode для адресов где его нет</a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
<!DOCTYPE html>{% load static %}
|
|
||||||
<html lang="ru-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 name="viewport" content="width=device-width, initial-scale=1"/>
|
|
||||||
|
|
||||||
<meta name="description" content="
|
|
||||||
{% block Description %}{{ META_DESCRIPTION|default:"" }}Служебный интерфейс «Окнардия» закрыт{% endblock %}"/>
|
|
||||||
<meta name="keywords"
|
|
||||||
content="{% block Keywords %}цены на пластиковые окна, агрегатор окон, доступ закрыт{{ META_KEYWORDS|default:"" }}{% endblock %}"/>
|
|
||||||
<meta name="author" content="OKNARDIA.RU{% block Author4Meta %}{% endblock %}"/>
|
|
||||||
<meta name="copyright" lang="ru" content="OKNARDIA.RU{% block CopyrightAuthor4Meta %}{% endblock %}"/>
|
|
||||||
<meta name="robots" content="index,follow"/>
|
|
||||||
<meta name="document-state" content="{{ META_DOCUMENT_STATE|default:"Static" }}"/>
|
|
||||||
<meta name="generator" content="OKNARDIA 0.3β by Python/Django"/>
|
|
||||||
<title>ОКНАРДИЯ: Нет доступа в служебный интерфейс</title>
|
|
||||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet" type="text/css" />{# <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" />#}
|
|
||||||
<script src="{% static 'js/jquery-2.1.1.min.js' %}" type="text/javascript"></script>{# <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>#}
|
|
||||||
<script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>{# <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" type="text/javascript"></script>#}{% block Top_JS1 %}{% endblock %}{% block Top_JS2 %}{% endblock %}{% block Top_JS3 %}{% endblock %}{% block Top_JS4 %}{% endblock %}{% block Top_JS5 %}{% endblock %}{% block Top_Meta1 %}{% endblock %}
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-8 col-xs-offset-4">
|
|
||||||
<p> <br> <br></p>
|
|
||||||
|
|
||||||
<h1 style="font-family: 'Open Sans Condensed', sans-serif;
|
|
||||||
font-size: 5em;
|
|
||||||
font-weight: 900;
|
|
||||||
text-shadow: 1px 1px 6px silver;">Служебный интерфейс закрыт</h1>
|
|
||||||
|
|
||||||
<p style="font-family: 'Open Sans Condensed', sans-serif;font-size: 3ex;">Доступ только для админов! Поисковикам и
|
|
||||||
пользователям лезть сюда не за чем…</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="height: 100% !important; width: 100% !important; background-image: url('/static/img/cubex.png');
|
|
||||||
background-repeat: no-repeat; background-position: 10% 85%; z-index:-2; position:absolute !important;
|
|
||||||
bottom: 0; right: 0;">
|
|
||||||
<div style="position: absolute; bottom: 0; right: 0;padding-bottom: 1ex;padding-right: 2ex;">
|
|
||||||
<script type="text/javascript">
|
|
||||||
{# <!-- Google Analylics --> #}(function (i, s, o, g, r, a, m) {
|
|
||||||
i['GoogleAnalyticsObject'] = r;
|
|
||||||
i[r] = i[r] || function () {
|
|
||||||
(i[r].q = i[r].q || []).push(arguments)
|
|
||||||
}, i[r].l = 1 * new Date();
|
|
||||||
a = s.createElement(o), m = s.getElementsByTagName(o)[0];
|
|
||||||
a.async = 1;
|
|
||||||
a.src = g;
|
|
||||||
m.parentNode.insertBefore(a, m)
|
|
||||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
|
||||||
ga('create', 'UA-9116991-5', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
{# <!-- Rating@Mail.ru counter --> #}var _tmr = _tmr || [];
|
|
||||||
_tmr.push({id: "2018432", type: "pageView", start: (new Date()).getTime()});
|
|
||||||
(function (d, w, id) {
|
|
||||||
if (d.getElementById(id))return;
|
|
||||||
var ts = d.createElement("script");
|
|
||||||
ts.type = "text/javascript";
|
|
||||||
ts.async = true;
|
|
||||||
ts.id = id;
|
|
||||||
ts.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//top-fwz1.mail.ru/js/code.js";
|
|
||||||
var f = function () {
|
|
||||||
var s = d.getElementsByTagName("script")[0];
|
|
||||||
s.parentNode.insertBefore(ts, s);
|
|
||||||
};
|
|
||||||
if (w.opera == "[object Opera]") {
|
|
||||||
d.addEventListener("DOMContentLoaded", f, false);
|
|
||||||
} else {
|
|
||||||
f();
|
|
||||||
}
|
|
||||||
})(document, window, "topmailru-code");
|
|
||||||
{# <!-- LiveInternet counter --> #}
|
|
||||||
</script>
|
|
||||||
<noscript>
|
|
||||||
<div style="position:absolute;left:-10000px;">
|
|
||||||
{# <!-- Rating@Mail.ru nosript --> #}<img src="//top-fwz1.mail.ru/counter?id=2018432;js=na"
|
|
||||||
style="border:0;height:1px;width:1px" alt=""/>
|
|
||||||
{# <!-- Yandex.Metrika counter --> #}<img src="//mc.yandex.ru/watch/32997984"
|
|
||||||
style="border:0;height:1px;width:1px"
|
|
||||||
alt=""/>{# <!-- /Yandex.Metrika counter --> #}
|
|
||||||
</div>
|
|
||||||
</noscript>
|
|
||||||
{#<!-- Rating@Mail.ru logo -->#}<a target="_blank" href="http://top.mail.ru/jump?from=2018432"><img
|
|
||||||
src="//top-fwz1.mail.ru/counter?id=2018432;t=216;l=1" style="border:0" rel="nofollow"
|
|
||||||
alt="Рейтинг@Mail.ru"></a>{#<!-- //Rating@Mail.ru logo -->#}
|
|
||||||
{# <!-- Yandex.Metrika informer --> #}<a href="https://metrika.yandex.ru/stat/?id=32997984&from=informer"
|
|
||||||
target="_blank" rel="nofollow"><img
|
|
||||||
src="https://informer.yandex.ru/informer/32997984/3_0_E0E0E0FF_C0C0C0FF_0_pageviews"
|
|
||||||
style="width:88px; height:31px; border:0;" alt="Яндекс.Метрика"
|
|
||||||
title="Яндекс.Метрика: данные за сегодня (просмотры, визиты и уникальные посетители)"
|
|
||||||
onclick="try{Ya.Metrika.informer({i:this,id:32997984,lang:'ru'});return false}catch(e){}"/></a>{# <!-- /Yandex.Metrika informer --> #}
|
|
||||||
{# <!-- begin of Top100 code --> #}<span id="rambler"><script id="top100Counter" type="text/javascript"
|
|
||||||
src="//counter.rambler.ru/top100.jcn?3148853"></script><noscript>
|
|
||||||
<a href="http://top100.rambler.ru/navi/3148853/"><img src="http://counter.rambler.ru/top100.cnt?3148853"
|
|
||||||
alt="Rambler's Top100" border="0"/></a>
|
|
||||||
</noscript></span>{# <!-- end of Top100 code --> #}
|
|
||||||
<script type="text/javascript"><!--
|
|
||||||
{#<!--LiveInternet counter-->#}document.write("<a href='//www.liveinternet.ru/click' target=_blank><img src='//counter.yadro.ru/hit?t50.2;r" + escape(document.referrer) + ((typeof(screen) == "undefined") ? "" : ";s" + screen.width + "*" + screen.height + "*" + (screen.colorDepth ? screen.colorDepth : screen.pixelDepth)) + ";u" + escape(document.URL) + ";" + Math.random() + "' alt='' title='LiveInternet' style='border:0;'><\/a>");
|
|
||||||
{# <!-- Yandex.Metrika counter --> #}(function (d, w, c) {
|
|
||||||
(w[c] = w[c] || []).push(function () {
|
|
||||||
try {
|
|
||||||
w.yaCounter32997984 = new Ya.Metrika({
|
|
||||||
id: 32997984,
|
|
||||||
clickmap: true,
|
|
||||||
trackLinks: true,
|
|
||||||
accurateTrackBounce: true,
|
|
||||||
webvisor: true,
|
|
||||||
trackHash: true
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () {
|
|
||||||
n.parentNode.insertBefore(s, n);
|
|
||||||
};
|
|
||||||
s.type = "text/javascript";
|
|
||||||
s.async = true;
|
|
||||||
s.src = "https://mc.yandex.ru/metrika/watch.js";
|
|
||||||
if (w.opera == "[object Opera]") {
|
|
||||||
d.addEventListener("DOMContentLoaded", f, false);
|
|
||||||
} else {
|
|
||||||
f();
|
|
||||||
}
|
|
||||||
})(document, window, "yandex_metrika_callbacks");
|
|
||||||
//--></script>
|
|
||||||
{# <!--/LiveInternet--> #}
|
|
||||||
</div>
|
|
||||||
<div style="position: absolute; bottom: 0; left: 0;padding-bottom: 1ex;padding-left: 2ex;font-size: x-small">
|
|
||||||
© <a href="/">oknardia.ru</a>, 2015-{% now "Y" %}.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,34 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from django.shortcuts import render, redirect
|
from django.shortcuts import render
|
||||||
from django.http import HttpRequest, HttpResponse
|
from django.http import HttpRequest, HttpResponse
|
||||||
from oknardia.models import PVCprofiles, Seria_Info, Win_MountDim, Building_Info, SetKit
|
|
||||||
from datetime import datetime, timezone
|
|
||||||
import django.utils.dateformat
|
|
||||||
import django.utils.timezone
|
|
||||||
from oknardia.settings import *
|
|
||||||
import time
|
|
||||||
|
|
||||||
|
|
||||||
# Главная страница для вызова служебных процедур.
|
|
||||||
def service(request: HttpRequest) -> HttpResponse:
|
|
||||||
""" Страница для вызова служебных процедур
|
|
||||||
|
|
||||||
:param request: HttpRequest
|
|
||||||
:return: HttpResponse
|
|
||||||
"""
|
|
||||||
time_start = time.perf_counter()
|
|
||||||
# проверка на аутентификацию
|
|
||||||
# print(request.user.is_authenticated)
|
|
||||||
if not request.user.is_authenticated:
|
|
||||||
return redirect("/service/not-denice")
|
|
||||||
return render(request, "service/index.html", {'ticks': float(time.perf_counter()-time_start)})
|
|
||||||
|
|
||||||
|
|
||||||
# страничка, на которую переадресует служебный интерфейс, если нет аутентификации.
|
|
||||||
def not_denice(request):
|
|
||||||
time_start = time.perf_counter()
|
|
||||||
return render(request, "service/not_denice.html", {'ticks': float(time.perf_counter()-time_start)})
|
|
||||||
|
|
||||||
|
|
||||||
def tmp(request: HttpRequest) -> HttpResponse:
|
def tmp(request: HttpRequest) -> HttpResponse:
|
||||||
""" Страница для тестирования верстки текста в блоге
|
""" Страница для тестирования верстки текста в блоге
|
||||||
@@ -36,5 +8,4 @@ def tmp(request: HttpRequest) -> HttpResponse:
|
|||||||
:param request:
|
:param request:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
t_start = time.perf_counter()
|
return render(request, "service/tmp.html")
|
||||||
return render(request, "service/tmp.html", {'TAU': float(time.perf_counter()-t_start)})
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 299 KiB |
Reference in New Issue
Block a user