From 3aa59e9b2d6e2bc9e125716bda695135a26810af Mon Sep 17 00:00:00 2001 From: Felipe Henrique de Almeida Bormann Date: Fri, 20 Jan 2017 17:07:46 -0300 Subject: [PATCH] search routine completed --- subjects/templates/subjects/list_search.html | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ subjects/urls.py | 3 ++- subjects/views.py | 55 ++++++++++++++++++++++++++++--------------------------- 3 files changed, 84 insertions(+), 28 deletions(-) create mode 100644 subjects/templates/subjects/list_search.html diff --git a/subjects/templates/subjects/list_search.html b/subjects/templates/subjects/list_search.html new file mode 100644 index 0000000..6af8830 --- /dev/null +++ b/subjects/templates/subjects/list_search.html @@ -0,0 +1,54 @@ +{% extends "subjects/list.html" %} + +{% load static i18n pagination %} +{% load django_bootstrap_breadcrumbs subject_counter %} + +{% block content %} + + {% if messages %} + {% for message in messages %} + + {% endfor %} + {% endif %} + +
+ +
+ +
+ + + {% if subjects|length > 0 %} +
+ {% for subject in subjects %} + {% include "subjects/subject_card.html" with accordion_id="subject-accordion" %} + {% endfor %} + + {% pagination request paginator page_obj %} +
+ {% else %} +
+ +

{% trans 'You still do not posses any subject in our platform' %}

+
+ {% endif %} +
+ + + +{% endblock content %} \ No newline at end of file diff --git a/subjects/urls.py b/subjects/urls.py index 4502626..6c2b593 100644 --- a/subjects/urls.py +++ b/subjects/urls.py @@ -5,7 +5,6 @@ urlpatterns = [ url(r'^home/$', views.HomeView.as_view(), name='home'), url(r'^$', views.IndexView.as_view(), name='index'), url(r'^category/(?P[\w_-]+)/$', views.IndexView.as_view(), name='cat_view'), - url(r'^(?P