Update README.md + added navbar because I was annoyed to always change the URI to change page

master
Corentin LEMAIRE 6 months ago
parent 0a32fb4a8e
commit 799497fe9b

@ -44,8 +44,6 @@ Don't try to go into http://localhost:8000/admin, you won't have the rights and
## TODO ## TODO
- Update course
- Publish a message - Publish a message
- Register to a course - Register to a course

@ -1,5 +1,15 @@
<html> <html>
<body> <body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person == '' %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
{% else %}
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
{% endif %}
</nav>
<h1>Courses for {{ person.name }}</h1> <h1>Courses for {{ person.name }}</h1>
{% if courses %} {% if courses %}
{% for course in courses %} {% for course in courses %}

@ -1,5 +1,15 @@
<html> <html>
<body> <body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person == '' %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
{% else %}
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
{% endif %}
</nav>
<form action="{% url 'create_course_form' %}" method="POST"> <form action="{% url 'create_course_form' %}" method="POST">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>

@ -1,5 +1,15 @@
<html> <html>
<body> <body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person == '' %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
{% else %}
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
{% endif %}
</nav>
{% if error_message %} {% if error_message %}
{{ error_message }} {{ error_message }}
{% endif %} {% endif %}

@ -1,13 +1,19 @@
<html> <html>
<body> <body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person == '' %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
{% else %}
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
{% endif %}
</nav>
{% if person != '' %} {% if person != '' %}
<h1>Welcome {{ person.name }}!</h1> <h1>Welcome {{ person.name }}!</h1>
{% else %} {% else %}
<h1>Welcome young padawan!</h1> <h1>Welcome young padawan!</h1>
{% endif %} {% endif %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
</body> </body>
</html> </html>

@ -1,5 +1,15 @@
<html> <html>
<body> <body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person.name == '' %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
{% else %}
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
{% endif %}
</nav>
<form action="{% url 'login' %}" method="POST"> <form action="{% url 'login' %}" method="POST">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>
@ -14,7 +24,6 @@
</select> </select>
</fieldset> </fieldset>
<input type="submit" value="Login"> <input type="submit" value="Login">
<a href="{% url 'register_form' %}">Register</a>
</form> </form>
</body> </body>
</html> </html>

@ -1,5 +1,15 @@
<html> <html>
<body> <body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person == '' %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
{% else %}
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
{% endif %}
</nav>
<form action="{% url 'change_profile' %}" method="POST"> <form action="{% url 'change_profile' %}" method="POST">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>
@ -15,6 +25,5 @@
</fieldset> </fieldset>
<input type="submit" value="Update"> <input type="submit" value="Update">
</form> </form>
<a href="{% url 'home' %}">Home</a>
</body> </body>
</html> </html>

@ -1,5 +1,15 @@
<html> <html>
<body> <body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person.name == '' %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
{% else %}
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
{% endif %}
</nav>
<form action="{% url 'register' %}" method="POST"> <form action="{% url 'register' %}" method="POST">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>

@ -1,7 +0,0 @@
<html>
<body>
{% for user in users %}
{{ user }}
{% endfor %}
</body>
</html>

@ -1,5 +1,15 @@
<html> <html>
<body> <body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person == '' %}
<a href="{% url 'login_form' %}">Login</a>
<a href="{% url 'register_form' %}">Register</a>
{% else %}
<a href="{% url 'courses' %}">Courses</a>
<a href="{% url 'profile' %}">Profile</a>
{% endif %}
</nav>
<form action="{% url 'update_course_form' course.id %}" method="POST"> <form action="{% url 'update_course_form' course.id %}" method="POST">
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>

Loading…
Cancel
Save