Commit 3a2f32a4 authored by Bunde's avatar Bunde
Browse files

Merge branch '2018-04-tg-landing-page' into 'master'

258 284: Add basic index/landing page

See merge request !9
parents 9ac9ceb5 443bd73a
Pipeline #60 passed with stage
in 18 seconds
from django.contrib import admin
from django.urls import path
from django.contrib.auth import views as auth_views
from django.views.generic import TemplateView
urlpatterns = [
path('', TemplateView.as_view(template_name='index.html'), name='index'),
path('login/', auth_views.LoginView.as_view(template_name="login.html"), name='login'),
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
......
{% extends "base.html" %}
{% load i18n bootstrap4 %}
{% block title %}{% trans "Start" %} · {{ block.super }}{% endblock %}
{% block content %}
{% if request.user.is_authenticated %}
<div>
{% if request.user.is_superuser %}
<div>You are logged in as admin</div>
{% else %}
<div>You are not listed as admin</div>
{% endif %}
<div>You are registered since {{ request.user.date_joined|timesince}}</div>
</div>
{% else %}
<div>
Not logged in
</div>
{% endif %}
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment