mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 14:38:03 +01:00
Add landing page
This commit is contained in:
parent
fec051b646
commit
23e166451e
3 changed files with 21 additions and 3 deletions
|
@ -1 +0,0 @@
|
|||
<p hx-get="{% url "hello_world" %}">Hello, world! Click me - {{ value }}</p>
|
17
src/common/templates/common/hello.html
Normal file
17
src/common/templates/common/hello.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% extends "common/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
<div class="p-5 mb-4 bg-light rounded-3">
|
||||
<div class="container-fluid py-5">
|
||||
<h1 class="display-5 fw-bold">Character Sheet</h1>
|
||||
<p class="col-md-8 fs-4">
|
||||
Bienvenue sur CharaSheet !<br>
|
||||
Vous devez vous identifier pour créer et gérer votre personnage.
|
||||
</p>
|
||||
<a href="{% url "django_registration_register" %}" class="btn btn-primary btn-lg">Créer un compte</a>
|
||||
<a href="{% url "login" %}" class="btn btn-secondary btn-lg">Se connecter</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -1,14 +1,16 @@
|
|||
from django.contrib.auth.models import Permission
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import redirect
|
||||
from django.shortcuts import redirect, render
|
||||
from django_registration.backends.activation.views import (
|
||||
ActivationView as BaseActivationView,
|
||||
)
|
||||
|
||||
|
||||
def hello_world(request: WSGIRequest) -> HttpResponse:
|
||||
if request.user.is_authenticated:
|
||||
return redirect("character:list")
|
||||
return render(request, "common/hello.html")
|
||||
|
||||
|
||||
class ActivationView(BaseActivationView):
|
||||
|
|
Loading…
Reference in a new issue