added README.md
|
@ -0,0 +1,16 @@
|
||||||
|
"""
|
||||||
|
ASGI config for djangoZoo 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/4.2/howto/deployment/asgi/
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from django.core.asgi import get_asgi_application
|
||||||
|
|
||||||
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoZoo.settings')
|
||||||
|
|
||||||
|
application = get_asgi_application()
|
|
@ -0,0 +1,131 @@
|
||||||
|
"""
|
||||||
|
Django settings for djangoZoo project.
|
||||||
|
|
||||||
|
Generated by 'django-admin startproject' using Django 4.2.7.
|
||||||
|
|
||||||
|
For more information on this file, see
|
||||||
|
https://docs.djangoproject.com/en/4.2/topics/settings/
|
||||||
|
|
||||||
|
For the full list of settings and their values, see
|
||||||
|
https://docs.djangoproject.com/en/4.2/ref/settings/
|
||||||
|
"""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
import os
|
||||||
|
|
||||||
|
# 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/4.2/howto/deployment/checklist/
|
||||||
|
|
||||||
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
|
SECRET_KEY = 'django-insecure-a+^ud21hj(^q3p7vucr@)*y57%p4f=b)vbneh@aj^n-4u&__=)'
|
||||||
|
|
||||||
|
# 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',
|
||||||
|
'test_browser',
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
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 = 'djangoZoo.urls'
|
||||||
|
|
||||||
|
TEMPLATES = [
|
||||||
|
{
|
||||||
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
|
'DIRS': ['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 = 'djangoZoo.wsgi.application'
|
||||||
|
|
||||||
|
|
||||||
|
# Database
|
||||||
|
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
'NAME': BASE_DIR / 'db.sqlite3',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Password validation
|
||||||
|
# https://docs.djangoproject.com/en/4.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/4.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/4.2/howto/static-files/
|
||||||
|
|
||||||
|
STATIC_URL = '/static/'
|
||||||
|
STATICFILES_DIRS = [
|
||||||
|
os.path.join(BASE_DIR, 'static'),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Default primary key field type
|
||||||
|
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
|
||||||
|
|
||||||
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
"""
|
||||||
|
URL configuration for djangoZoo project.
|
||||||
|
|
||||||
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||||
|
https://docs.djangoproject.com/en/4.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 test_browser.views import index_page, tickets_page, check_choice
|
||||||
|
|
||||||
|
|
||||||
|
app_name = "test_browser"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
|
||||||
|
path('admin/', admin.site.urls),
|
||||||
|
path('', index_page),
|
||||||
|
path('tickets.html', tickets_page),
|
||||||
|
path('check_choice/', check_choice, name = 'check_choice'),
|
||||||
|
|
||||||
|
|
||||||
|
]
|
|
@ -0,0 +1,16 @@
|
||||||
|
"""
|
||||||
|
WSGI config for djangoZoo 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/4.2/howto/deployment/wsgi/
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|
||||||
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoZoo.settings')
|
||||||
|
|
||||||
|
application = get_wsgi_application()
|
|
@ -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', 'djangoZoo.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()
|
After Width: | Height: | Size: 268 KiB |
After Width: | Height: | Size: 266 KiB |
After Width: | Height: | Size: 985 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 446 KiB |
After Width: | Height: | Size: 279 KiB |
|
@ -0,0 +1,30 @@
|
||||||
|
$(document).ready(function (){
|
||||||
|
$('.plus').click(function (e){
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var inc_value = $(this).closest('.product-data').find('.qty-input').val();
|
||||||
|
var value = parseInt(inc_value,10);
|
||||||
|
value = isNaN(value) ? 0: value ;
|
||||||
|
if (value < 10){
|
||||||
|
value++;
|
||||||
|
$(this).closest('.product-data').find('.qty-input').val(value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
$('.minus').click(function (e){
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var inc_value = $(this).closest('.product-data').find('.qty-input').val();
|
||||||
|
var value = parseInt(inc_value,10);
|
||||||
|
value = isNaN(value) ? 0: value ;
|
||||||
|
if (value > 0){
|
||||||
|
value--;
|
||||||
|
$(this).closest('.product-data').find('.qty-input').val(value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 58 KiB |
|
@ -0,0 +1,34 @@
|
||||||
|
{% load static %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-image: url('{% static "bg6.jpg" %}' );
|
||||||
|
background-size: inherit;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div style="font-size: 50px;background-color: #eceeef; width: 45%; border-radius: 10px; margin-top: 10%" >
|
||||||
|
<div style="color: black">Ваш выбор: <br> {{tickets.0}} - {{quantity1}}
|
||||||
|
<br> {{tickets.1}} - {{quantity2}}
|
||||||
|
<br> {{tickets.2}} - {{quantity3}}
|
||||||
|
<br> Сумма к оплате - {{total_price}} P.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="centered-div">Выберите способ оплаты:
|
||||||
|
<br>
|
||||||
|
<img src='{% static "sbp.jpg"%}'> <img src='{% static "cash.jpg"%}' width="20%"> <img src='{% static "webmoney.jpg"%}' width="20%">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.centered-div {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,153 @@
|
||||||
|
<!-- index.html -->
|
||||||
|
{% load static %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||||
|
<head>
|
||||||
|
|
||||||
|
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-image: url('{% static "bg.jpg" %}');
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body >
|
||||||
|
<h1 class="centered-div" style="font-size: 72px; margin-bottom: 50px;">ЗООПАРК "СКАЗКА"</h1>
|
||||||
|
<div class="centered-div">
|
||||||
|
<a href="tickets.html"><button type="button" style="width: 800px; height: 150px; font-size: 50px; opacity: 0.7; margin-bottom: 50px; border-radius: 10px;">Билеты</button></a>
|
||||||
|
</div>
|
||||||
|
<div class="centered-div">
|
||||||
|
<a href="#info"><button type="button" style="width: 800px; height: 150px; font-size: 50px; opacity: 0.7; margin-bottom: 50px; border-radius: 10px;">Наши правила</button></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="{% static '/js/jquery-3.7.1.min.js' %}"></script>
|
||||||
|
<script src="{% static '/js/custom.js' %}"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
.centered-div {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.modal {
|
||||||
|
position: absolute;
|
||||||
|
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>
|
|
@ -0,0 +1,782 @@
|
||||||
|
<!-- index.html -->
|
||||||
|
{% load static %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
|
||||||
|
<head>
|
||||||
|
|
||||||
|
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Tickets</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-image: url('{% static "bg5.jpg" %}');
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 class="centered-div" style="font-size: 72px; margin-bottom: 50px; margin-top: 0; color: mediumseagreen">Пожалуйста, выберите тип билетов и укажите их количество</h1>
|
||||||
|
<form action="{% url 'check_choice' %}" >
|
||||||
|
|
||||||
|
<table style="margin-left: 300px">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="color: mediumseagreen; font-size: 50px"> Наименование</th>
|
||||||
|
<th style="color: mediumseagreen; font-size: 50px; padding-left: 100px"> Цена</th>
|
||||||
|
<th style="color: mediumseagreen; font-size: 50px; padding-left: 100px""> Количество</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td class="centered-div"><button type="button" style="width: 650px; height: 90px; font-size: 50px; opacity: 0.7; margin-bottom: 50px; border-radius: 10px;">{{tickets.0}} </button></td>
|
||||||
|
<td class="centered-div"><button style="width: 250px; height: 90px; font-size: 50px; opacity: 0.7; margin-bottom: 50px; margin-left: 100px; border-radius: 10px;"> {{tickets.0.price}} P. </button></td>
|
||||||
|
<td class="centered-div product-data">
|
||||||
|
<button style="border: none; background: transparent; margin-bottom: 75px"><span class="change minus" style="font-size: 75px; color: mediumseagreen; margin-left: 10px; font-weight: bold">
|
||||||
|
-
|
||||||
|
</span>
|
||||||
|
<input type="text" class="qty-input" value="{{tickets.0.quantity}}" name="ticket1" style="border: none; font-size: 50px; width: 25px; background: transparent;">
|
||||||
|
<span class="change plus" style="font-size: 64px; color: mediumseagreen;margin-left: 10px; ">
|
||||||
|
+
|
||||||
|
</span>
|
||||||
|
</button></td>
|
||||||
|
</div>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="centered-div"><button type="button" style="width: 650px; height: 90px; font-size: 50px; opacity: 0.7; margin-bottom: 50px; border-radius: 10px;">{{tickets.1}} </button></td>
|
||||||
|
<td class="centered-div"><button style="width: 250px; height: 90px; font-size: 50px; opacity: 0.7; margin-bottom: 50px; margin-left: 100px; border-radius: 10px;"> {{tickets.1.price}} P. </button></td>
|
||||||
|
<td class="centered-div product-data">
|
||||||
|
<button style="border: none; background: transparent; margin-bottom: 75px"> <span class="change minus" style="font-size: 75px; color: mediumseagreen; margin-left: 10px; font-weight: bold">
|
||||||
|
-
|
||||||
|
</span>
|
||||||
|
<input type="text" class="qty-input" value="{{tickets.1.quantity}}" name="ticket2" style="border: none; font-size: 50px; width: 25px; background: transparent;">
|
||||||
|
<span class="change plus" style="font-size: 64px; color: mediumseagreen;margin-left: 10px; ">
|
||||||
|
+
|
||||||
|
</span></button></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="centered-div"><button type="button" style="width: 650px; height: 90px; font-size: 50px; opacity: 0.7; margin-bottom: 50px; border-radius: 10px;">{{tickets.2}} </button></td>
|
||||||
|
<td class="centered-div"><button style="width: 250px; height: 90px; font-size: 50px; opacity: 0.7; margin-bottom: 50px; margin-left: 100px; border-radius: 10px;"> {{tickets.2.price}} P. </button></td>
|
||||||
|
<td class="centered-div product-data">
|
||||||
|
<button style="border: none; background: transparent; margin-bottom: 75px"><span class="change minus" style="font-size: 75px; color: mediumseagreen; margin-left: 10px; font-weight: bold">
|
||||||
|
-
|
||||||
|
</span>
|
||||||
|
<input type="text" class="qty-input" value="{{tickets.2.quantity}}" name="ticket3" style="border: none; font-size: 50px; width: 25px; background: transparent;">
|
||||||
|
<span class="change plus" style="font-size: 64px; color: mediumseagreen;margin-left: 10px; ">
|
||||||
|
+
|
||||||
|
</span></button></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="centered-div">
|
||||||
|
<button type="submit" style="background: transparent; border: None"><a href="#pay" class="button button--pen">
|
||||||
|
<div class="button__wrapper">
|
||||||
|
<span class="button__text">Далее</span>
|
||||||
|
</div>
|
||||||
|
<div class="characterBox">
|
||||||
|
<div class="character wakeup">
|
||||||
|
<div class="character__face"></div>
|
||||||
|
<div class="charactor__face2"></div>
|
||||||
|
</div>
|
||||||
|
<div class="character wakeup">
|
||||||
|
<div class="character__face"></div>
|
||||||
|
<div class="charactor__face2"></div>
|
||||||
|
</div>
|
||||||
|
<div class="character">
|
||||||
|
<div class="character__face"></div>
|
||||||
|
<div class="charactor__face2"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<div style="color: darkred; font-size: 24px;">* Сопровождающие льготных посетителей приобретают "Взрослый билет". Льготникам потребуется показать документы на право льготы охраннику</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="{% static '/js/jquery-3.7.1.min.js' %}"></script>
|
||||||
|
<script src="{% static '/js/custom.js' %}"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.centered-div {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal {
|
||||||
|
position: absolute;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
.button--piyo{
|
||||||
|
--main_color : #f4cf47 ;
|
||||||
|
--sub_color1 : #f4e19c ;
|
||||||
|
--sub_color2 : #ff8108 ;
|
||||||
|
--base_color : #000 ;
|
||||||
|
--border_radius1 : 60px 60px 40px 40px / 48px 48px 30px 30px ;
|
||||||
|
--border_radius2 : 70px 70px 40px 40px / 48px 48px 30px 30px ;
|
||||||
|
--border_radius3 : 40px 40px 40px 40px / 48px 48px 30px 30px ;
|
||||||
|
}
|
||||||
|
.button--hoo{
|
||||||
|
--main_color : #4993ff ;
|
||||||
|
--sub_color1 : #385082 ;
|
||||||
|
--sub_color2 : #fff58f ;
|
||||||
|
--sub_color3 : #fff ;
|
||||||
|
--base_color : #FFF ;
|
||||||
|
--border_radius1 : 50px 50px 50px 50px / 40px 40px 40px 40px ;
|
||||||
|
--border_radius2 : 60px 60px 50px 50px / 40px 40px 40px 40px ;
|
||||||
|
--border_radius3 : 40px 40px 50px 50px / 60px 60px 40px 40px ;
|
||||||
|
--border_radius3 : 50px 50px 45px 45px / 40px 40px 60px 60px ;
|
||||||
|
}
|
||||||
|
.button--pen{
|
||||||
|
--main_color : #4d4d4d ;
|
||||||
|
--sub_color1 : #FFF ;
|
||||||
|
--sub_color2 : #e9b800 ;
|
||||||
|
--base_color : #e9b800 ;
|
||||||
|
--border_radius1 : 60px 60px 40px 40px / 48px 48px 30px 30px ;
|
||||||
|
--border_radius2 : 70px 70px 40px 40px / 48px 48px 30px 30px ;
|
||||||
|
--border_radius3 : 40px 40px 40px 40px / 48px 48px 30px 30px ;
|
||||||
|
}
|
||||||
|
.button{
|
||||||
|
position : relative ;
|
||||||
|
display : flex ;
|
||||||
|
justify-content : center ;
|
||||||
|
align-items : center ;
|
||||||
|
width : 280px ;
|
||||||
|
height : 80px ;
|
||||||
|
box-sizing : border-box ;
|
||||||
|
text-decoration : none ;
|
||||||
|
border : solid 3px #000 ;
|
||||||
|
border-radius : 40px ;
|
||||||
|
background : var(--main_color) ;
|
||||||
|
font-family: 'Fredoka One', cursive;
|
||||||
|
}
|
||||||
|
.button::before{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
z-index : 2 ;
|
||||||
|
top : 0 ;
|
||||||
|
right : 20px ;
|
||||||
|
bottom : 0 ;
|
||||||
|
margin : auto 0 ;
|
||||||
|
width : 24px ;
|
||||||
|
height : 24px ;
|
||||||
|
background : var(--base_color) ;
|
||||||
|
transition : all ease .2s ;
|
||||||
|
}
|
||||||
|
.button__wrapper{
|
||||||
|
display : flex ;
|
||||||
|
justify-content : center ;
|
||||||
|
align-items : center ;
|
||||||
|
position : relative ;
|
||||||
|
z-index : 1 ;
|
||||||
|
width : 100% ;
|
||||||
|
height : 100% ;
|
||||||
|
border-radius : 40px ;
|
||||||
|
overflow : hidden ;
|
||||||
|
}
|
||||||
|
.button__wrapper::before,
|
||||||
|
.button__wrapper::after{
|
||||||
|
transition : all .5s ease ;
|
||||||
|
}
|
||||||
|
.characterBox{
|
||||||
|
position : absolute ;
|
||||||
|
top : -54px ;
|
||||||
|
left : 0 ;
|
||||||
|
right : 0 ;
|
||||||
|
margin : 0 auto ;
|
||||||
|
display : flex ;
|
||||||
|
justify-content : space-between ;
|
||||||
|
align-items : flex-end ;
|
||||||
|
width : 180px ;
|
||||||
|
height : 56px ;
|
||||||
|
}
|
||||||
|
.button__text{
|
||||||
|
position : relative ;
|
||||||
|
z-index : 3 ;
|
||||||
|
font-size : 32px ;
|
||||||
|
letter-spacing : 4px ;
|
||||||
|
color : var(--base_color) ;
|
||||||
|
transition : all .3s ease ;
|
||||||
|
}
|
||||||
|
.character{
|
||||||
|
position : relative ;
|
||||||
|
width : 56px ;
|
||||||
|
height : 36px ;
|
||||||
|
box-sizing : border-box ;
|
||||||
|
border : solid 3px #000 ;
|
||||||
|
background : var(--main_color) ;
|
||||||
|
border-radius : var(--border_radius1) ;
|
||||||
|
animation : sleep 1s ease infinite alternate ;
|
||||||
|
}
|
||||||
|
.character::before{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
top : -12px ;
|
||||||
|
left : 22px ;
|
||||||
|
width : 12px ;
|
||||||
|
height : 12px ;
|
||||||
|
background : #000 ;
|
||||||
|
clip-path : path('M10.23,3.32c-3.54,.63-5.72,2.51-7.02,4.23-.33-1.58-.34-3.54,.93-5.12,.52-.65,.41-1.59-.24-2.11C3.24-.19,2.29-.08,1.77,.57c-3.82,4.77-.31,11.11-.13,11.42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.01-.02,2.49,.04,2.52,0,.1-.14,1.54-4.82,6.59-5.71,.82-.14,1.37-.92,1.22-1.74s-.94-1.36-1.75-1.21Z') ;
|
||||||
|
}
|
||||||
|
.character__face{
|
||||||
|
position : absolute ;
|
||||||
|
z-index : 2 ;
|
||||||
|
top : 15px ;
|
||||||
|
left : 0 ;
|
||||||
|
right : 0 ;
|
||||||
|
margin : 0 auto ;
|
||||||
|
width : 12px ;
|
||||||
|
height : 6px ;
|
||||||
|
background : var(--sub_color2) ;
|
||||||
|
border-radius : 50% 50% 50% 50% / 78% 78% 22% 22% ;
|
||||||
|
transition : .2s ;
|
||||||
|
}
|
||||||
|
.character__face::before,
|
||||||
|
.character__face::after{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
top : -4px ;
|
||||||
|
width : 8px ;
|
||||||
|
height : 2px ;
|
||||||
|
border-radius : 4px ;
|
||||||
|
background : #000 ;
|
||||||
|
}
|
||||||
|
.character__face::before{
|
||||||
|
left : -5px ;
|
||||||
|
}
|
||||||
|
.character__face::after{
|
||||||
|
right : -5px ;
|
||||||
|
}
|
||||||
|
.button--hoo .character__face::before,
|
||||||
|
.button--hoo .character__face::after{
|
||||||
|
background : #fff ;
|
||||||
|
}
|
||||||
|
.button--hoo .charactor__face2{
|
||||||
|
position : absolute ;
|
||||||
|
z-index : 1 ;
|
||||||
|
top : 8px ;
|
||||||
|
left : 0 ;
|
||||||
|
right : 0 ;
|
||||||
|
margin : auto ;
|
||||||
|
width : 14px ;
|
||||||
|
height : 10px ;
|
||||||
|
background : #385082 ;
|
||||||
|
animation : face_hoo 1s ease infinite alternate ;
|
||||||
|
}
|
||||||
|
.button--hoo .charactor__face2::before,
|
||||||
|
.button--hoo .charactor__face2::after{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
top : -1px ;
|
||||||
|
width : 20px ;
|
||||||
|
height : 10px ;
|
||||||
|
box-sizing : border-box ;
|
||||||
|
border-radius : 50% ;
|
||||||
|
border : solid 3px #385082 ;
|
||||||
|
background : #000 ;
|
||||||
|
}
|
||||||
|
.button--hoo .charactor__face2::before{
|
||||||
|
left : -12px ;
|
||||||
|
}
|
||||||
|
.button--hoo .charactor__face2::after{
|
||||||
|
right : -12px ;
|
||||||
|
}
|
||||||
|
.button--hoo .charactor__body{
|
||||||
|
position : absolute ;
|
||||||
|
bottom : 0 ;
|
||||||
|
left : 0 ;
|
||||||
|
right : 0 ;
|
||||||
|
margin : 0 auto ;
|
||||||
|
width : 0 ;
|
||||||
|
height : 0 ;
|
||||||
|
border-top : solid 2px #385082 ;
|
||||||
|
border-left : solid 7px transparent ;
|
||||||
|
border-right : solid 7px transparent ;
|
||||||
|
border-bottom : solid 0 transparent ;
|
||||||
|
animation : body_hoo 1s ease infinite alternate ;
|
||||||
|
}
|
||||||
|
.button--hoo .charactor__body::before,
|
||||||
|
.button--hoo .charactor__body::after{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
top : -4px ;
|
||||||
|
width : 0 ;
|
||||||
|
height : 0 ;
|
||||||
|
border-top : solid 2px #385082 ;
|
||||||
|
border-left : solid 7px transparent ;
|
||||||
|
border-right : solid 7px transparent ;
|
||||||
|
border-bottom : solid 0 transparent ;
|
||||||
|
}
|
||||||
|
.button--hoo .charactor__body::before{
|
||||||
|
left : -17px ;
|
||||||
|
}
|
||||||
|
.button--hoo .charactor__body::after{
|
||||||
|
right : -17px ;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button--pen .charactor__face2{
|
||||||
|
position : absolute ;
|
||||||
|
z-index : 1 ;
|
||||||
|
bottom : 0 ;
|
||||||
|
left : 0 ;
|
||||||
|
right : 0 ;
|
||||||
|
margin : auto ;
|
||||||
|
width : 30px ;
|
||||||
|
height : 10px ;
|
||||||
|
border-radius : 50% ;
|
||||||
|
background : #fff ;
|
||||||
|
animation : face_pen 1s ease infinite alternate ;
|
||||||
|
}
|
||||||
|
.button--pen .charactor__face2::before,
|
||||||
|
.button--pen .charactor__face2::after{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
top : -8px ;
|
||||||
|
width : 17px ;
|
||||||
|
height : 10px ;
|
||||||
|
border-radius : 50% ;
|
||||||
|
background : #fff ;
|
||||||
|
}
|
||||||
|
.button--pen .charactor__face2::before{
|
||||||
|
left : -4px ;
|
||||||
|
}
|
||||||
|
.button--pen .charactor__face2::after{
|
||||||
|
right : -4px ;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button--piyo::before{
|
||||||
|
clip-path : path('M24,12.02c0-1.09-.75-1.71-.81-1.77L11.17,.45c-.91-.74-2.21-.56-2.91,.42-.69,.97-.52,2.37,.39,3.11l7.12,5.81-13.7-.02h0C.93,9.77,0,10.76,0,11.99c0,1.23,.93,2.22,2.07,2.22l13.7,.02-7.13,5.78c-.91,.74-1.09,2.13-.4,3.11,.41,.58,1.03,.88,1.65,.88,.44,0,.88-.15,1.25-.45l12.04-9.76c.07-.06,.82-.67,.82-1.77Z') ;
|
||||||
|
}
|
||||||
|
.button--hoo::before{
|
||||||
|
clip-path : path('M21.93,9.8h-3.33S11.5,.79,11.5,.79c-.74-.94-2.05-1.05-2.92-.26-.88,.79-.99,2.19-.25,3.13l4.84,6.13-11.09-.02C.95,9.73,0,10.76,0,11.99c0,1.23,.93,2.22,2.07,2.22l11.09,.02-4.86,6.12c-.74,.93-.63,2.33,.24,3.13,.39,.35,.87,.53,1.34,.53,.59,0,1.17-.27,1.58-.78l7.13-8.99h3.32s0,0,0,0c1.14,0,2.07-.99,2.07-2.22,0-1.23-.93-2.22-2.07-2.22Z') ;
|
||||||
|
}
|
||||||
|
.button--pen::before{
|
||||||
|
clip-path : path('M23.36,10.63L6.18,.13c-.93-.57-1.85,.81-1.39,2.06l1.44,3.91c.3,.81,.01,1.81-.6,2.1L.72,10.58c-.96,.47-.96,2.37,0,2.83l4.91,2.38c.62,.3,.9,1.29,.6,2.1l-1.44,3.91c-.46,1.26,.46,2.63,1.39,2.06L23.36,13.37c.86-.53,.86-2.22,0-2.75Z') ;
|
||||||
|
}
|
||||||
|
.button--piyo .button__wrapper::before,
|
||||||
|
.button--piyo .button__wrapper::after{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
bottom : 0 ;
|
||||||
|
width : 130px ;
|
||||||
|
height : 38px ;
|
||||||
|
background : var(--sub_color1) ;
|
||||||
|
clip-path : path('M13.77,37.35L.25,16.6c-.87-1.33,.69-2.91,2-2.02l12.67,8.59c.81,.55,1.91,.14,2.18-.81l2.62-9.33c.39-1.4,2.34-1.42,2.76-.02l3.6,11.99c.33,1.11,1.74,1.4,2.47,.52L49.38,.52c.87-1.04,2.53-.42,2.53,.95V23.7c0,1.13,1.2,1.83,2.16,1.26l12.75-7.51c.85-.5,1.94,0,2.13,.98l1.5,7.6c.2,1.03,1.37,1.51,2.22,.92l17.74-12.3c1.09-.75,2.52,.25,2.21,1.55l-2.44,10.2c-.26,1.09,.74,2.06,1.8,1.75l30.8-9.04c1.37-.4,2.42,1.26,1.49,2.36l-9.07,10.66c-.83,.98-.1,2.49,1.17,2.42l12.12-.68c1.6-.09,2.12,2.15,.65,2.8l-2.73,1.21c-.18,.08-.38,.12-.58,.12H14.97c-.48,0-.93-.25-1.2-.65Z') ;
|
||||||
|
}
|
||||||
|
.button--piyo .button__wrapper::before{
|
||||||
|
left : 0 ;
|
||||||
|
}
|
||||||
|
.button--piyo .button__wrapper::after{
|
||||||
|
right : 0 ;
|
||||||
|
transform : rotateY(180deg) ;
|
||||||
|
}
|
||||||
|
.button--hoo .button__wrapper::before,
|
||||||
|
.button--hoo .button__wrapper::after{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
width : 80px ;
|
||||||
|
height : 100px ;
|
||||||
|
background : var(--sub_color1) ;
|
||||||
|
clip-path : path('M75.96,41.27l-42.76,11.17V0H0V100H33.2v-28.75l45.07-23.97c3.38-1.8,1.39-6.98-2.31-6.01Z') ;
|
||||||
|
}
|
||||||
|
.button--hoo .button__wrapper::before{
|
||||||
|
left : 6px ;
|
||||||
|
bottom : 0 ;
|
||||||
|
}
|
||||||
|
.button--hoo .button__wrapper::after{
|
||||||
|
right : 8px ;
|
||||||
|
bottom : -10px ;
|
||||||
|
transform : rotateY(180deg) ;
|
||||||
|
}
|
||||||
|
.button--pen .button__wrapper::before,
|
||||||
|
.button--pen .button__wrapper::after{
|
||||||
|
content : '' ;
|
||||||
|
position : absolute ;
|
||||||
|
width : 110px ;
|
||||||
|
height : 60px ;
|
||||||
|
background : var(--sub_color1) ;
|
||||||
|
clip-path : path('M9.12,14.14L43.15,.5c1.61-.86,3.57-.59,4.9,.68l19.55,14.31c.42,.4,.76,.89,.99,1.42l3.45,13.09c.89,2.06,3.18,3.09,5.28,2.37l11.76-4.86c1.56-.54,3.29-.11,4.43,1.1l11.93,12.39c.48,.51,.84,1.12,1.03,1.8l3.35,11.62c.8,2.79-1.25,5.58-4.1,5.58H4.27c-2.71,0-4.73-2.54-4.18-5.24L6.92,17.11c.26-1.28,1.07-2.37,2.2-2.97Z') ;
|
||||||
|
}
|
||||||
|
.button--pen .button__wrapper::before{
|
||||||
|
left : -16px ;
|
||||||
|
bottom : -10px ;
|
||||||
|
}
|
||||||
|
.button--pen .button__wrapper::after{
|
||||||
|
right : -8px ;
|
||||||
|
bottom : -20px ;
|
||||||
|
transform : rotateY(180deg) ;
|
||||||
|
}
|
||||||
|
.button:hover .button__wrapper::before{
|
||||||
|
transform : translateX(-12px) ;
|
||||||
|
}
|
||||||
|
.button:hover .button__wrapper::after{
|
||||||
|
transform : rotateY(180deg) translateX(-12px) ;
|
||||||
|
}
|
||||||
|
.button:hover .button__text{
|
||||||
|
letter-spacing : 6px ;
|
||||||
|
}
|
||||||
|
.button:hover::before{
|
||||||
|
right : 14px ;
|
||||||
|
}
|
||||||
|
.button:hover .wakeup{
|
||||||
|
animation : wakeup .2s ease ;
|
||||||
|
animation-fill-mode : forwards ;
|
||||||
|
}
|
||||||
|
.button:hover .wakeup .character__face{
|
||||||
|
top : 20px ;
|
||||||
|
}
|
||||||
|
.button:hover .wakeup .character__face::before,
|
||||||
|
.button:hover .wakeup .character__face::after{
|
||||||
|
animation : eye 5s linear infinite ;
|
||||||
|
}
|
||||||
|
.button:hover .wakeup:nth-child(2) .character__face::before,
|
||||||
|
.button:hover .wakeup:nth-child(2) .character__face::after{
|
||||||
|
animation : eye_2 5s linear infinite ;
|
||||||
|
}
|
||||||
|
.button--hoo:hover .wakeup .charactor__face2::before,
|
||||||
|
.button--hoo:hover .wakeup .charactor__face2::after{
|
||||||
|
height : 20px ;
|
||||||
|
}
|
||||||
|
.button--hoo:hover .wakeup .charactor__body{
|
||||||
|
animation : body_hoo_wakeup .2s ease ;
|
||||||
|
animation-fill-mode : forwards ;
|
||||||
|
border-top : solid 6px #385082 ;
|
||||||
|
}
|
||||||
|
.button--hoo:hover .wakeup .charactor__body::before,
|
||||||
|
.button--hoo:hover .wakeup .charactor__body::after{
|
||||||
|
top : -12px ;
|
||||||
|
border-top : solid 5px #385082 ;
|
||||||
|
}
|
||||||
|
.button--pen:hover .wakeup .charactor__face2{
|
||||||
|
animation : face_pen_wakeup .2s ease ;
|
||||||
|
animation-fill-mode : forwards ;
|
||||||
|
}
|
||||||
|
.button--pen:hover .wakeup .charactor__face2::before,
|
||||||
|
.button--pen:hover .wakeup .charactor__face2::after{
|
||||||
|
top : -12px ;
|
||||||
|
height : 18px ;
|
||||||
|
}
|
||||||
|
@keyframes sleep{
|
||||||
|
0% {
|
||||||
|
height : 36px ;
|
||||||
|
border-radius : var(--border_radius1) ;
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
height : 32px ;
|
||||||
|
border-radius : var(--border_radius2) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes wakeup{
|
||||||
|
0% {
|
||||||
|
height : 32px ;
|
||||||
|
border-radius : var(--border_radius2) ;
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
height : 56px ;
|
||||||
|
border-radius : var(--border_radius3) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes eye {
|
||||||
|
0%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
30%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
32%{
|
||||||
|
top : -4px ;
|
||||||
|
width : 8px ;
|
||||||
|
height : 2px ;
|
||||||
|
}
|
||||||
|
34%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
70%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
72%{
|
||||||
|
top : -4px ;
|
||||||
|
width : 8px ;
|
||||||
|
height : 2px ;
|
||||||
|
}
|
||||||
|
74%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
76%{
|
||||||
|
top : -4px ;
|
||||||
|
width : 8px ;
|
||||||
|
height : 2px ;
|
||||||
|
}
|
||||||
|
78%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes eye_2 {
|
||||||
|
0%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
10%{
|
||||||
|
transform : translateX(0);
|
||||||
|
}
|
||||||
|
12%{
|
||||||
|
transform : translateX(3px);
|
||||||
|
}
|
||||||
|
20%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
22%{
|
||||||
|
top : -4px ;
|
||||||
|
width : 8px ;
|
||||||
|
height : 2px ;
|
||||||
|
}
|
||||||
|
24%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
25%{
|
||||||
|
transform : translateX(3px);
|
||||||
|
}
|
||||||
|
27%{
|
||||||
|
transform : translateX(0);
|
||||||
|
}
|
||||||
|
74%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
transform : translateX(0);
|
||||||
|
}
|
||||||
|
76%{
|
||||||
|
top : -4px ;
|
||||||
|
width : 8px ;
|
||||||
|
height : 2px ;
|
||||||
|
transform : translateX(3px);
|
||||||
|
}
|
||||||
|
78%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
80%{
|
||||||
|
top : -4px ;
|
||||||
|
width : 8px ;
|
||||||
|
height : 2px ;
|
||||||
|
}
|
||||||
|
82%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
}
|
||||||
|
85%{
|
||||||
|
transform : translateX(3px);
|
||||||
|
}
|
||||||
|
87%{
|
||||||
|
transform : translateX(0);
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
top : -6px ;
|
||||||
|
width : 6px ;
|
||||||
|
height : 6px ;
|
||||||
|
transform : translateX(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes body_hoo{
|
||||||
|
0% {
|
||||||
|
bottom : 2px ;
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
bottom : 0 ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes body_hoo_wakeup{
|
||||||
|
0% {
|
||||||
|
bottom : 2px ;
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
bottom : 6px ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes face_pen{
|
||||||
|
0% {
|
||||||
|
height : 14px ;
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
height : 10px ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes face_pen_wakeup{
|
||||||
|
0% {
|
||||||
|
height : 14px ;
|
||||||
|
}
|
||||||
|
100%{
|
||||||
|
height : 28px ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* 本体と関係ないスタイル */
|
||||||
|
.container{
|
||||||
|
width : 100% ;
|
||||||
|
|
||||||
|
display : flex ;
|
||||||
|
flex-direction : column ;
|
||||||
|
justify-content : center ;
|
||||||
|
align-items : center ;
|
||||||
|
|
||||||
|
}
|
||||||
|
.button:not(:last-child){
|
||||||
|
margin-bottom : 80px ;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</style>
|
|
@ -0,0 +1,8 @@
|
||||||
|
from django.contrib import admin
|
||||||
|
from test_browser.models import Ticket, Order
|
||||||
|
|
||||||
|
# Register your models here.
|
||||||
|
admin.site.register(Ticket)
|
||||||
|
admin.site.register(Order)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class TestBrowserConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'test_browser'
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-01 12:45
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Tickets',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=150)),
|
||||||
|
('price', models.IntegerField(default=0)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-04 09:12
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='tickets',
|
||||||
|
name='price',
|
||||||
|
field=models.DecimalField(decimal_places=2, max_digits=8),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-05 13:45
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0002_alter_tickets_price'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameModel(
|
||||||
|
old_name='Tickets',
|
||||||
|
new_name='Ticket',
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-05 13:51
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0003_rename_tickets_ticket'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='CartItem',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('quantity', models.PositiveIntegerField(default=0)),
|
||||||
|
('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test_browser.ticket')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-06 09:00
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0004_cartitem'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='ticket',
|
||||||
|
name='quantity',
|
||||||
|
field=models.PositiveIntegerField(default=0),
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='CartItem',
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-06 23:10
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0005_ticket_quantity_delete_cartitem'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='ticket',
|
||||||
|
old_name='quantity',
|
||||||
|
new_name='quantity1',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='ticket',
|
||||||
|
name='quantity2',
|
||||||
|
field=models.PositiveIntegerField(default=0),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='ticket',
|
||||||
|
name='quantity3',
|
||||||
|
field=models.PositiveIntegerField(default=0),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,37 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-07 11:26
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0006_rename_quantity_ticket_quantity1_ticket_quantity2_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Order',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=150)),
|
||||||
|
('price', models.DecimalField(decimal_places=2, max_digits=8)),
|
||||||
|
('quantity0', models.PositiveIntegerField(default=0)),
|
||||||
|
('quantity1', models.PositiveIntegerField(default=0)),
|
||||||
|
('quantity2', models.PositiveIntegerField(default=0)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='ticket',
|
||||||
|
old_name='quantity1',
|
||||||
|
new_name='quantity',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='ticket',
|
||||||
|
name='quantity2',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='ticket',
|
||||||
|
name='quantity3',
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-07 11:35
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0007_order_rename_quantity1_ticket_quantity_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='order',
|
||||||
|
name='price',
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-07 13:29
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0008_remove_order_price'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Order',
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-07 13:30
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0009_delete_order'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Order',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=150)),
|
||||||
|
('quantity0', models.PositiveIntegerField(default=0)),
|
||||||
|
('quantity1', models.PositiveIntegerField(default=0)),
|
||||||
|
('quantity2', models.PositiveIntegerField(default=0)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,16 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-07 13:32
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0010_order'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Order',
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-07 13:32
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0011_delete_order'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Order',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=150)),
|
||||||
|
('quantity0', models.PositiveIntegerField(default=0)),
|
||||||
|
('quantity1', models.PositiveIntegerField(default=0)),
|
||||||
|
('quantity2', models.PositiveIntegerField(default=0)),
|
||||||
|
('total_price', models.DecimalField(decimal_places=1, max_digits=10)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-07 13:35
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0012_order'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='order',
|
||||||
|
name='total_price',
|
||||||
|
field=models.DecimalField(blank=True, decimal_places=1, max_digits=10),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-08 06:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0013_alter_order_total_price'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='order',
|
||||||
|
name='total_price',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='test_browser.ticket'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,45 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-08 08:01
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0014_alter_order_total_price'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='AdultTicket',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=150)),
|
||||||
|
('price', models.DecimalField(decimal_places=2, max_digits=8)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='FreeTicket',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=150)),
|
||||||
|
('price', models.DecimalField(decimal_places=2, max_digits=8)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='KidTicket',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=150)),
|
||||||
|
('price', models.DecimalField(decimal_places=2, max_digits=8)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='order',
|
||||||
|
name='total_price',
|
||||||
|
field=models.DecimalField(decimal_places=1, max_digits=10),
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Ticket',
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Generated by Django 4.2.7 on 2023-12-08 08:18
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('test_browser', '0015_adultticket_freeticket_kidticket_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Ticket',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=150)),
|
||||||
|
('price', models.DecimalField(decimal_places=2, max_digits=8)),
|
||||||
|
('quantity', models.PositiveIntegerField(default=0)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='AdultTicket',
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='FreeTicket',
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='KidTicket',
|
||||||
|
),
|
||||||
|
]
|
|
@ -0,0 +1,29 @@
|
||||||
|
from django.db import models
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
|
from djangoZoo import settings
|
||||||
|
|
||||||
|
|
||||||
|
# Create your models here.
|
||||||
|
class Ticket(models.Model):
|
||||||
|
name = models.CharField(max_length=150)
|
||||||
|
price = models.DecimalField(max_digits=8, decimal_places=2)
|
||||||
|
quantity = models.PositiveIntegerField(default=0)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
class Order(models.Model):
|
||||||
|
name = models.CharField(max_length=150)
|
||||||
|
quantity0 = models.PositiveIntegerField(default=0)
|
||||||
|
quantity1 = models.PositiveIntegerField(default=0)
|
||||||
|
quantity2 = models.PositiveIntegerField(default=0)
|
||||||
|
total_price = models.DecimalField(max_digits=10, decimal_places=1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
|
@ -0,0 +1,50 @@
|
||||||
|
from django.shortcuts import render, redirect
|
||||||
|
|
||||||
|
from djangoZoo import settings
|
||||||
|
from test_browser.models import Ticket, Order
|
||||||
|
|
||||||
|
|
||||||
|
# Create your views here.
|
||||||
|
|
||||||
|
def index_page(request):
|
||||||
|
return render(request, 'index.html')
|
||||||
|
|
||||||
|
def tickets_page(request):
|
||||||
|
|
||||||
|
all_Ticket = Ticket.objects.all()
|
||||||
|
|
||||||
|
return render(request, 'tickets.html', context={'tickets': all_Ticket})
|
||||||
|
|
||||||
|
|
||||||
|
def check_choice(request):
|
||||||
|
|
||||||
|
all_Ticket = Ticket.objects.all()
|
||||||
|
quantity0 = request.GET['ticket1']
|
||||||
|
quantity1 = request.GET['ticket2']
|
||||||
|
quantity2 = request.GET['ticket3']
|
||||||
|
total_price = (all_Ticket[0].price * int(quantity0) + all_Ticket[1].price * int(quantity1))
|
||||||
|
element = Order(name = 'Order #', quantity0 = quantity0, quantity1 = quantity1, quantity2 = quantity2,
|
||||||
|
total_price = total_price)
|
||||||
|
element.save()
|
||||||
|
return render(request, 'check_choice.html', {'quantity1' : quantity0,
|
||||||
|
'quantity2' : quantity1,
|
||||||
|
'quantity3' : quantity2,
|
||||||
|
'tickets': all_Ticket,
|
||||||
|
'total_price' : total_price})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|