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> </head>
<body> <body>
{% load account %}
<!--Navbar--> <!--Navbar-->
<div class="navbar"> <div class="navbar">
<div class="container flex"> <div class="container flex">
@ -39,7 +39,9 @@
<div class="container"> <div class="container">
<a href="{% url 'events' %}"><div class="btn btn-list">Zobacz Wydarzenia</div></a> <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> <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> <a href="add_category/"><div class="btn btn-list">Stwórz Kategorie</div></a>
{% endif %}
</div> </div>
</section> </section>

View File

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