reinstalled django because of problems with the migrations and installed taggit-template2 to list tags

This commit is contained in:
Esther Kleinhenz
2018-08-18 18:30:57 +02:00
parent a1ff9def5c
commit 2cb1629a81
1212 changed files with 141299 additions and 106234 deletions
+3
View File
@@ -8,6 +8,8 @@
<title> {% block title %}Seitenname{% endblock %}</title>
<link href="{% static 'css/application.css' %}" rel="stylesheet">
<link href="{% static 'bootstrap/css/bootstrap.css' %}" rel="stylesheet">
{% include "taggit_templatetags2/tagcanvas_include_js_static.html" %}
{% include_tagcanvas 'tag-cloud' 'width px' 'height px' 'post_list.html' 'application' %}
</head>
<body>
@@ -90,6 +92,7 @@
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="{% static 'bootstrap/js/jquery-1.11.1.js' %} "></script>
<script src="{% static 'bootstrap/jsjquery.tagcanvas.min.js' %} " type="text/javascript"></script>
<script src="{% static 'bootstrap/js/bootstrap.bundle.js' %}"></script>
</body>
+13 -3
View File
@@ -1,4 +1,4 @@
{% extends 'base.html' %} {% block content %} {% for post in posts %}
{% extends 'base.html' %} {% block content %} {% for post in posts %} {% load taggit_templatetags2_tags %}
<div class="post">
<div class="date">
{{ post.published_date }}
@@ -8,7 +8,7 @@
</h1>
<p>{{ post.text|linebreaks }}</p>
<p>
{% for tag in post.tags.all %}
{% for tag in post.tags.all %}
<a href="">{{ tag.name }}, </a>
{% endfor %}
</p>
@@ -17,4 +17,14 @@
</p>
</div>
{% endfor %} {% endblock %}
{% endfor %}
{% get_tagcloud as tags for 'application' %}
<div id="tag-cloud">
<ul>
{% for tag in tags %}
<li>{{tag}} ({{tag.num_times}})</li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}