Update main page
This commit is contained in:
parent
dbbd8b4a99
commit
a29dc5b97c
@ -91,6 +91,12 @@ class MainView(BaseTemplateMixin, TemplateView):
|
||||
template_name = 'parts/main.html'
|
||||
navbar_selected = 'Main'
|
||||
base_title = 'Main'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['user'] = self.request.user
|
||||
return context
|
||||
|
||||
|
||||
def logout_view(request):
|
||||
logout(request)
|
||||
|
@ -1,5 +1,17 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
Hi
|
||||
{% else %}
|
||||
<section class="bg-dark text-light p-5 text-center">
|
||||
<div class="container">
|
||||
<div class="d-sm-flex">
|
||||
<div>
|
||||
<h1>Shimatta Stock Management System. <a href="{% url 'login' %}" class="text-decoration-none text-warning">Login now</a>.</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
Loading…
Reference in New Issue
Block a user