parent
799497fe9b
commit
d6321f5718
@ -0,0 +1,32 @@
|
||||
<html>
|
||||
<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>
|
||||
<a href="{% url 'search' %}">Search</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
<form action="{% url 'search_form' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
<legend><h1>Search</h1></legend>
|
||||
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
|
||||
<label for="keywords">Keywords</label><br>
|
||||
<input name="keywords" id="keywords" placeholder="Keywords separated by spaces"><br/>
|
||||
</fieldset>
|
||||
<input type="submit" value="Search">
|
||||
</form>
|
||||
{% if courses %}
|
||||
{% for course in courses %}
|
||||
<a href="{% url 'details' course.id %}">{{ course.title }}</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>No course found</p>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue