Initial Commit

This commit is contained in:
Neill Cox 2024-06-26 14:29:06 +10:00
commit 715224653d
58 changed files with 7760 additions and 0 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block content %}
<ul>
{% for character in characters %}
<li>
<a href="{% url 'details' character.uuid %}">{{ character.name }}</a>
<a href="{% url 'download' character.uuid %}">Download</a>
</li>
{% endfor %}
</ul>
<a href="{% url 'upload' %}">Upload new character</a>
<form method="POST" enctype="multipart/form-data" action="{% url 'index' %}">
{% csrf_token %}
{{ form }}
<input type="submit" value="Upload">
</form>
{% endblock %}

View file

@ -0,0 +1,7 @@
{% extends "base.html" %}
{% block content %}
<form method="POST" enctype="multipart/form-data" action="{% url 'upload' %}">
{% csrf_token %}
{{ form }}
</form>
{% endblock %}

View file

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block content %}
<h3>Welcome to the character store</h3>
<p<This is a webapp for storing characters.<p>
<p>Currently it works with GURPS, specifically characters created by GCS</p>
{% endblock %}

View file

@ -0,0 +1,48 @@
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item"><a class="nav-link active" aria-current="page" href="/">Home</a></li>
<li class="nav-item"><a class="nav-link active" aria-current="page" href="/gurps">GURPS</a></li>
<li class="nav-item"><a class="nav-link disabled" aria-current="page" href="/rq">RuneQuest</a></li>
<li class="nav-item">
<a class="nav-link" href="/admin">Admin</a>
</li>
<!--<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link disabled" aria-disabled="true">Disabled</a>
</li>
</ul>
<form class="d-flex" role="search">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
-->
</div>
<div class="navbar-text float-end">
{% if user.is_authenticated %}
<form method="post" action="{% url 'logout' %}">
{% csrf_token %}
<button type="submit">logout</button>
</form>
{% else %}
<a class="nav-link" href="{% url 'login' %}">Login</a>
{% endif %}
</div>
</div>
</nav>

View file

@ -0,0 +1,38 @@
{% extends "base.html" %}
{% block content %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
{% if next %}
{% if user.is_authenticated %}
<p>Your account doesn't have access to this page. To proceed,
please login with an account that has access.</p>
{% else %}
<p>Please login to see this page.</p>
{% endif %}
{% endif %}
<form method="post" action="{% url 'login' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<input type="submit" value="login">
<input type="hidden" name="next" value="{{ next }}">
</form>
{# Assumes you set up the password_reset view in your URLconf #}
<p><a href="{% url 'password_reset' %}">Lost password?</a></p>
{% endblock %}