edited tag list in search and changed quotes in txt

This commit is contained in:
Esther Kleinhenz
2018-11-17 15:23:17 +01:00
parent 5bcd86db97
commit ea8d8826b6
22 changed files with 504 additions and 299 deletions
@@ -1,10 +1,18 @@
{% extends "base.html" %} {% block content %}
{% load taggit_templatetags2_tags %}
{% get_tagcloud as tags for 'application' %}
{% include_tagcloud 'application.Post' %}
<div class="container-fluid">
<div class="modal-body row">
<div class="col-md-6">
<div class="col-md-8">
<p> Alle Tags im Überblick<br>
</p>
<div class="col-md-5">
<div style="border:solid; text-align:center;padding:5px;">
{% get_tagcloud as tags for 'application' %}
{% include_tagcloud 'application.Post' %}
</div>
</div>
<div style="padding-bottom:40px;">
</div>
Tag-Suche
<div id="custom-search-input">
<form type="get" action="." style="margin: 0" class="post-form">
@@ -36,7 +44,22 @@
</div>
</div>
</div>
<div class="col-md-6">
<div class="col-md-4">
<p> Bereits abonnierten Tags
</p>
<div class="col-md-10">
{% if tags %}
<div style="border:solid; text-align:center;padding:5px;">
{% for tag in tagsuser %}
{{ tag.name }}
{% if not forloop.last %}, {% endif %}
{% endfor %}
</div>
{% endif %}
</div>
<div style="padding-bottom:40px;">
</div>
Abonniere deine Tags hier!
<form class="post-form" method="post">
{% csrf_token %} {{form.as_p}}
+5 -5
View File
@@ -1,14 +1,14 @@
{% extends "base.html" %} {% block content %}
{% load taggit_templatetags2_tags %}
{% load taggit_templatetags2_tags %}
<div>
</div>
<div>
<a id="search_submit" href="/posts" class="save btn btn-outline-dark">alle Artikel
</a>
<a id="search_submit" href="/posts" class="save btn btn-outline-dark">alle Artikel
</a>
{% for post in posts %}
{% for post in posts %}
<div class="post">
<div class="date">
{{ post.published_date }}
@@ -23,6 +23,6 @@
{{ post.author }}
</p>
</div>
{% endfor %}
{% endfor %}
</div>
{% endblock %}
+3 -1
View File
@@ -26,7 +26,6 @@ import operator
def navlogin(request):
log = logging.getLogger('mysite')
logout(request)
error = ""
@@ -157,6 +156,9 @@ def blog_search_list_view(request):
log.info(search_query)
posts = posts.filter(tags__name__in=[search_query])
log = logging.getLogger('mysite')
u = User.objects.get(username=request.user)
if u:
tagsuser = Tag.objects.filter(customuser__user = u)
user_instance = get_object_or_404(CustomUser, user=request.user)
if request.method == "POST":
log.info('post method')