Add users

This commit is contained in:
Joakim Hellsén 2024-02-23 06:21:06 +01:00
commit 09ad44f247
13 changed files with 382 additions and 57 deletions

View file

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<h2>Change Password</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Change Password</button>
</form>
{% endblock %}

View file

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block content %}
<p>
You can register <a href='{% url "feeds:register" %}'>here</a>.
</p>
<h2>Login</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Login</button>
</form>
{% endblock %}

View file

@ -0,0 +1,27 @@
{% extends "base.html" %}
{% block content %}
<h2>{{ user.username }}</h2>
<h3>Feeds</h3>
<ul>
{% for feed in feeds %}
<li>
<a href='{% url "feeds:feed" feed.id %}'>{{ feed.title }}</a>
</li>
{% endfor %}
</ul>
<h3>Subscriptions</h3>
<ul>
{% for subscription in subscriptions %}
<li>
<a href='{% url "feeds:feed" subscription.id %}'>{{ subscription.title }}</a>
</li>
{% endfor %}
</ul>
<h3>Subscribers</h3>
<p>
<form action="{% url 'feeds:logout' %}" method="post">
{% csrf_token %}
<button type="submit">Logout</button>
</form>
</p>
{% endblock %}

View file

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<h2>Register</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Register</button>
</form>
{% endblock %}