logout link fixed, add_category only for admin

This commit is contained in:
Mikhail Ronchyk 2022-01-09 23:36:15 +03:00
parent 2bbcc3050a
commit 4145694f2f
6 changed files with 9 additions and 2 deletions

View File

@ -10,7 +10,7 @@
</head>
<body>
{% load account %}
<!--Navbar-->
<div class="navbar">
<div class="container flex">
@ -39,7 +39,9 @@
<div class="container">
<a href="{% url 'events' %}"><div class="btn btn-list">Zobacz Wydarzenia</div></a>
<a href="add_event/"><div class="btn btn-list">Stwórz Wydarzenie</div></a>
{% if user.username == "admin" %}
<a href="add_category/"><div class="btn btn-list">Stwórz Kategorie</div></a>
{% endif %}
</div>
</section>

View File

@ -146,7 +146,9 @@ if DEBUG:
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
STATIC_URL = '/static/'
LOGIN_REDIRECT_URL = '../../events'
LOGOUT_REDIRECT_URL = '../../events/'
ACCOUNT_LOGOUT_REDIRECT_URL = '../../events'
SESSION_COOKIE_SECURE = False
#STATICFILES_DIRS = [
# os.path.join(BASE_DIR, 'events/highneed_react/build/static'),

View File

@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}

Binary file not shown.

Binary file not shown.