added logger and logging addon

This commit is contained in:
Esther Kleinhenz
2018-10-19 09:29:55 +02:00
parent d01ed0085c
commit 7d0350d452
151 changed files with 21780 additions and 11 deletions
+2 -3
View File
@@ -4,15 +4,14 @@
<div id="">
Your tags:
<ul>
{% for tag in tags %}
{% for tag in users %}
<li>
<a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag }}</a>
</li>
{% endfor %}
</ul>
</div>
<div>
{{ tags }} {{ u }}
{{ u }} {{ arr }}
</div>
<div>
from List: {% for tag in tags %}
+9
View File
@@ -1,7 +1,11 @@
from django.conf import settings
from django.conf.urls import url
from django.conf.urls import include
from django.urls import path
from taggit_templatetags2 import urls as taggit_templatetags2_urls
from . import views
import debug_toolbar
urlpatterns = [
url(r'^$', views.post_list, name='post_list'),
@@ -19,3 +23,8 @@ urlpatterns = [
url(r'^tags/', include('taggit_templatetags2.urls')),
]
if settings.DEBUG:
import debug_toolbar
urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls)),
]
+9 -8
View File
@@ -144,17 +144,18 @@ def student_page(request):
def tag_list(request):
log = logging.getLogger('mysite')
u = CustomUser.objects.get(user=request.user)
tags= Tag.objects.filter(customuser=u)
arr=[]
arr.append(tags)
log.info("test".format(arr))
"""
tags= Tag.objects.filter(name=u)
log.info(tags)
arr = []
for tag in tags:
arr.append(str(tag))
"""
arr.append(tags)
for tag in tags:
arr.append(str(tag))
listing = list(arr)
"""
listing = list(arr)
return render(request, 'tag_list.html', locals())
return render(request, 'tag_list.html', {'arr':arr})
class TagSearch(TagCanvasListView):
template_name = 'blog_search_list_view.html'