zaglushki added
This commit is contained in:
parent
1ad049c279
commit
dd1e910417
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
Binary file not shown.
|
@ -16,7 +16,7 @@ Including another URLconf
|
|||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from test_browser.views import index_page, tickets_page, check_choice
|
||||
from test_browser.views import index_page, tickets_page, check_choice, QR
|
||||
|
||||
|
||||
app_name = "test_browser"
|
||||
|
@ -30,6 +30,11 @@ urlpatterns = [
|
|||
path('', index_page),
|
||||
path('tickets.html', tickets_page),
|
||||
path('check_choice/', check_choice, name = 'check_choice'),
|
||||
path('check_choice/QR.html', QR),
|
||||
path('check_choice/main', index_page),
|
||||
path('check_choice/tickets.html', tickets_page)
|
||||
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>Вы успешно оплатили {{total_price}} P.
|
||||
<br>Возьмите пожалуйста чек
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -12,7 +12,7 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="font-size: 50px;background-color: #eceeef; width: 45%; border-radius: 10px; margin-top: 10%" >
|
||||
<div style="font-size: 50px;background-color: #eceeef; width: 45%; border-radius: 10px; margin-top: 10% ; margin-left: 5%" >
|
||||
<div style="color: black">Ваш выбор: <br> {{tickets.0}} - {{quantity1}}
|
||||
<br> {{tickets.1}} - {{quantity2}}
|
||||
<br> {{tickets.2}} - {{quantity3}}
|
||||
|
@ -21,9 +21,68 @@
|
|||
|
||||
<div class="centered-div" >Выберите способ оплаты:
|
||||
<br>
|
||||
<img src='{% static "sbp.jpg"%}'> <img src='{% static "cash.jpg"%}' width="20%"> <img src='{% static "webmoney.jpg"%}' width="20%">
|
||||
<a href="#openQR" ><img src='{% static "sbp.jpg"%}'></a>
|
||||
<a href="#opencash" ><img src='{% static "cash.jpg"%}' width="20%"></a>
|
||||
<a href="#openBN" ><img src='{% static "webmoney.jpg"%}' width="20%"></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="openQR" class="modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Заголовок</h3>
|
||||
<a href="#close" title="Close" class="close">×</a>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul>
|
||||
<li><a href="QR.html" ><img src="http://qrcoder.ru/code/?http%3A%2F%2F127.0.0.1%3A8000%2Fcheck_choice%2FQR.html&4&0" width="148" height="148" border="0" title="QR код"></a></li>
|
||||
<meta http-equiv="refresh" content="3;url=main" />
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="opencash" class="modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Заголовок</h3>
|
||||
<a href="#close" title="Close" class="close">×</a>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul>
|
||||
<li>Внесите в купюроприемник сумму наличных, равную {{total_price}} P.</li>
|
||||
<meta http-equiv="refresh" content="3;url=main" />
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="openBN" class="modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">Заголовок</h3>
|
||||
<a href="#close" title="Close" class="close">×</a>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul>
|
||||
<li>Cледуйте инструкциям на терминале</li>
|
||||
<meta http-equiv="refresh" content="3;url=main" />
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -31,4 +90,118 @@
|
|||
.centered-div {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.modal {
|
||||
position: fixed; /* фиксированное положение */
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: rgba(0,0,0,0.5); /* фон */
|
||||
z-index: 1050;
|
||||
opacity: 0; /* по умолчанию модальное окно прозрачно */
|
||||
-webkit-transition: opacity 200ms ease-in;
|
||||
-moz-transition: opacity 200ms ease-in;
|
||||
transition: opacity 200ms ease-in; /* анимация перехода */
|
||||
pointer-events: none; /* элемент невидим для событий мыши */
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
/* При отображении модального окно */
|
||||
.modal:target {
|
||||
opacity: 1; /* делаем окно видимым */
|
||||
pointer-events: auto; /* элемент видим для событий мыши */
|
||||
overflow-y: auto; /* добавляем прокрутку по y, когда элемент не помещается на страницу */
|
||||
}
|
||||
/* ширина модального окна и его отступы от экрана */
|
||||
.modal-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
@media (min-width: 576px) {
|
||||
.modal-dialog {
|
||||
max-width: 500px;
|
||||
margin: 30px auto; /* отображение окна по центру */
|
||||
}
|
||||
}
|
||||
/* Стили для блока с контентом окна */
|
||||
.modal-content {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
border: 1px solid rgba(0,0,0,.2);
|
||||
border-radius: .3rem;
|
||||
outline: 0;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.modal-content {
|
||||
-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
|
||||
box-shadow: 0 5px 15px rgba(0,0,0,.5);
|
||||
}
|
||||
}
|
||||
/* Стили заголовка окна */
|
||||
.modal-header {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #eceeef;
|
||||
}
|
||||
.modal-title {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
line-height: 1.5;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
/* Стили кнопки "х" ("Закрыть") */
|
||||
.close {
|
||||
float: right;
|
||||
font-family: sans-serif;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
opacity: .5;
|
||||
text-decoration: none;
|
||||
}
|
||||
/* Стили для закрывающей кнопки в фокусе или наведении */
|
||||
.close:focus, .close:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
opacity: .75;
|
||||
}
|
||||
/* Стили блока основного содержимого окна */
|
||||
.modal-body {
|
||||
position: relative;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex: 1 1 auto;
|
||||
-ms-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
padding: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
</style>
|
Binary file not shown.
|
@ -32,6 +32,10 @@ def check_choice(request):
|
|||
'tickets': all_Ticket,
|
||||
'total_price' : total_price})
|
||||
|
||||
def QR(request):
|
||||
total_cost = Order.objects.last()
|
||||
total_price = total_cost.total_price
|
||||
return render(request, 'QR.html', {'total_price' : total_price})
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue