This commit is contained in:
Ross
2022-05-24 12:30:11 +01:00
parent bbcbc02e0d
commit 41a09ea30d
29 changed files with 506 additions and 247 deletions
+6 -1
View File
@@ -2,7 +2,7 @@
{% block content %}
<div class="anatomy">
<h1>Your profile</h1>
<h1>Profile</h1>
<div>
Username: {{ user.username }}
</div>
@@ -13,6 +13,9 @@
Name: {{ user.first_name }}
{{ user.last_name }}
</div>
<div>
Grade: {{ user.userprofile.grade }}
</div>
<div>
Supervisor: {{ user.userprofile.supervisor_name }}<br/>
Supervisor Email: {{ user.userprofile.supervisor_email }}<br/>
@@ -22,5 +25,7 @@
</div>
<a href="{% url 'password_change'%}">Change password</a>
<a href="{% url 'account_update' user.username %}">Update user details</a>
<a href="{% url 'account_profile_update' user.username %}">Update user profile</a>
</div>
{% endblock %}
+15
View File
@@ -0,0 +1,15 @@
{% extends "generic/base.html" %}
{% block content %}
<h2>Users</h2>
<ul>
{% for user in object_list %}
<li>Username: <a href="{% url 'account_profile' user.username %}">{{ user.username }}</a><br/>
Name: {{user.first_name}} {{user.last_name}}<br/>
Registration number: {{user.registration_number}}
<button class="small-url-button"><a href="{% url 'account_update' user.username %}">Edit user</a></button>
<button class="small-url-button"><a href="{% url 'account_profile_update' user.username %}">Edit profile</a></button>
</li>
{% endfor %}
</ul>
{% endblock %}
+9
View File
@@ -0,0 +1,9 @@
{% extends 'generic/base.html' %}
{% block content %}
<h2>Editing user: {{object.username}}</h2>
<form method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Update">
</form>
{% endblock %}