сделал страничку с сообщением об оформлении заказа
This commit is contained in:
parent
718e53ac22
commit
a6756b7c0d
@ -9,6 +9,8 @@ urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('films/', include('films.urls'), name='films'),
|
||||
path('timetable/', include('timetable.urls'), name='timetable'),
|
||||
path('orders/', include('tickets.urls'), name='orders'),
|
||||
path('tickets/', include('tickets.urls'), name='tickets'),
|
||||
path("auth/", include("users.urls"), name="auth"),
|
||||
path("auth/", include("django.contrib.auth.urls"), name="auth"),
|
||||
]
|
||||
|
||||
22
CineSync/films/migrations/0007_alter_film_countries.py
Normal file
22
CineSync/films/migrations/0007_alter_film_countries.py
Normal file
@ -0,0 +1,22 @@
|
||||
# Generated by Django 4.2 on 2024-04-21 12:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("films", "0006_actor_country_director_film_actors_film_countries_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="film",
|
||||
name="countries",
|
||||
field=models.ManyToManyField(
|
||||
related_name="country_films",
|
||||
related_query_name="country_films",
|
||||
to="films.country",
|
||||
),
|
||||
),
|
||||
]
|
||||
19
CineSync/static/css/tickets/order_success.css
Normal file
19
CineSync/static/css/tickets/order_success.css
Normal file
@ -0,0 +1,19 @@
|
||||
.order_info_block {
|
||||
height: 40vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.text_block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.order_success_title, .order_success_text, .order_success_btn {
|
||||
color: #eaeaea;
|
||||
}
|
||||
.order_success_image {
|
||||
width: 20vw;
|
||||
}
|
||||
BIN
CineSync/static/img/success.png
Normal file
BIN
CineSync/static/img/success.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 673 KiB |
18
CineSync/templates/tickets/order_success.html
Normal file
18
CineSync/templates/tickets/order_success.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load tags %}
|
||||
{% block title %}
|
||||
Заказ оформлен
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<link href="{% static 'css/style.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/tickets/order_success.css' %}" rel="stylesheet">
|
||||
<div class="order_info_block">
|
||||
<div class="text_block">
|
||||
<h1 class="order_success_title">Заказ успешно оформлен</h1>
|
||||
<img class="order_success_image" src="{% static 'img/success.png' %}">
|
||||
<p class="order_success_text">Скоро он станет доступен в списке ваших заказов</p>
|
||||
<a class="btn btn-primary" href="{% url 'home:homepage' %}">Отлично</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -1,9 +1,10 @@
|
||||
from django.urls import path
|
||||
|
||||
from tickets.views import ticket_view
|
||||
from tickets.views import ticket_view, order_success
|
||||
|
||||
app_name = 'tickets'
|
||||
|
||||
urlpatterns = [
|
||||
path('', ticket_view, name='tickets'),
|
||||
]
|
||||
path('/order/success', order_success, name='order_success'),
|
||||
]
|
||||
|
||||
@ -3,3 +3,7 @@ from django.shortcuts import render, get_object_or_404
|
||||
|
||||
def ticket_view(request):
|
||||
return render(request, 'tickets/ticket_buy.html')
|
||||
|
||||
|
||||
def order_success(request):
|
||||
return render(request, 'tickets/order_success.html')
|
||||
|
||||
@ -82,7 +82,7 @@ def session_view(request, sess_id):
|
||||
column_number=seat[1],
|
||||
)
|
||||
|
||||
return redirect(reverse('home:homepage'))
|
||||
return redirect(reverse('tickets:order_success'))
|
||||
else:
|
||||
form = SeatSelectionForm(auditorium=session.auditorium)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user