Initial working version with minor bugs
This commit is contained in:
parent
f946e4933a
commit
71b3993326
83 changed files with 34485 additions and 173 deletions
17
templates/friend_codes/add_friend_code.html
Normal file
17
templates/friend_codes/add_friend_code.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Add Friend Code{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Add Friend Code</h1>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<button type="submit">Add Friend Code</button>
|
||||
</form>
|
||||
|
||||
<p>
|
||||
<a href="{% url 'list_friend_codes' %}">Back to Friend Codes</a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
13
templates/friend_codes/confirm_delete_friend_code.html
Normal file
13
templates/friend_codes/confirm_delete_friend_code.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{% extends '_base.html' %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Log in{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Are you sure you want to delete friend code: {{ friend_code.friend_code }}?</h1>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit">Confirm Delete</button>
|
||||
<a href="{% url 'list_friend_codes' %}">Cancel</a>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
25
templates/friend_codes/list_friend_codes.html
Normal file
25
templates/friend_codes/list_friend_codes.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{% extends '_base.html' %}
|
||||
|
||||
{% block title %}My Friend Codes{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>My Friend Codes</h1>
|
||||
|
||||
{% if friend_codes %}
|
||||
<ul>
|
||||
{% for code in friend_codes %}
|
||||
<li>
|
||||
{{ code.friend_code }}
|
||||
<!-- Link to the delete confirmation page for this friend code -->
|
||||
<a href="{% url 'delete_friend_code' code.id %}">Delete</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p>You do not have any friend codes added yet.</p>
|
||||
{% endif %}
|
||||
|
||||
<p>
|
||||
<a href="{% url 'add_friend_code' %}">Add a New Friend Code</a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue