Ошибка: TypeError at /drinks/
views.py:
from django.shortcuts import render
def index(request):
return render(request, 'index.html')
def about(request):
return render(request, 'about.html')
def work(request):
return request(request, 'work.html')
urls.py:
from django.contrib import admin
from django.urls import path
from myapp1.views import index
from myapp1.views import about
from myapp1.views import work
urlpatterns = [
path('admin/', admin.site.urls),
path('', index),
path('products/', about),
path('drinks/', work)
]
index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="urf-6">
<meta name="outhor" content="Magnat">
<meta name="description" content="Тестовая страница">
<link rel="stylesheet" href="/css/index.css">
<title>Главная страница сайт</title>
</head>
<body><h1 class="Rizmarket">
<big>Вас приветствует<br>Rizmarket</big></h1>
<hr>
<p style="text-align: center; background-color: #f99100;width: 100cqmax;">
<em><big>что вы хотите купить у нас есть все что вы хотите</big></em></p>
<div class="">
<button class="button" onclick="location.href='products/'">Продукты</button>
<button class="button" onclick="location.href='drinks/'">Напидки</button>
<button class="button">Еда</button>
</div>
</body>
</html>
Bот скрин с ошибкой: https://i.stack.imgur.com/462ED.jpg
Вот work.html:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/css/index2.css">
<link rel="stylesheet" href="/css/bootstrap-grid.min.css">
<link rel="preconnect" href="/css/bootstrap-reboot.min.css">
</head>
<body>
<nav class="navbar">
<div class="container">
<a href="#" class="navbar-brand">Rizmarket</a>
<div class="navbar-wrap">
<ul class="navbar-menu">
<li><a href="#">О нас </a></li>
<li><a href="#">Портфолио</a></li>
<li><a href="#">Цены</a></li>
<li><a href="#">Контакты</a></li>
</ul>
<a href="#" class="callback">Обратный звонок</a>
</div>
</div>
</nav>
</body>
</html>
Вот его CSS файл:
body {
position: relative;
font-family: 'Noto Sans', sans-serif;
font-size: 16px;
line-height: 1.4;
color: #000;
min-width: 320px;
overflow-x: hidden;
height: auto;
}
.navbar {
width: 100%;
height: 70px;
box-shadow: 0 4px 10px rgba( 0, 0, 0, .1);
}
.navbar .container{
height: inherit;
display: flex;
justify-content: space-between;
align-items: center;
}
.navbar-menu {
list-style-type: none;
padding-left: 0;
margin-bottom: 0;
}
.navbar-menu li {
display: inline-block;
}
.navbar-menu li a {
display: inline-block;
text-decoration: none;
color: #000;
opacity: 0.6;
padding: 10px;
transition: all .07s ease-in-out;
}
.navbar-menu li a:hover {
opacity: 1;
}
.navbar-wrap {
display: flex;
flex-flow: row nowrap;
}
.callback {
margin-left: 30px;
padding: 20px 10px;
background-color: coral;
border-radius: 100px;
color: #fff;
text-decoration: none;
box-shadow: 0 4px 6px rgba(255, 127, 80, .2);
transition: all .1s ease-out;
}
.callback:hover {
transform: scale(1.04);
color: #fff;
box-shadow: 0 9px 9px rgba(255, 127, 80, .5);
}
.navbar-brand {
font-weight: 700;
font-size: 26px;
text-decoration: none;
color: #000;
transition: all .07s ease-in-out;
}
.navbar-brand:hover {
color: coral;
}