Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Castellum
castellum
Commits
3a2f32a4
Commit
3a2f32a4
authored
Apr 13, 2018
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
castellum_core/castellum_core/castellum_core/urls.py
View file @
3a2f32a4
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'
),
...
...
castellum_core/castellum_core/templates/index.html
0 → 100644
View file @
3a2f32a4
{% 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 %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment