From 9b564418c062ea43e465eebc7ac5ffd865556507 Mon Sep 17 00:00:00 2001 From: kinitrupti Date: Fri, 4 Nov 2016 17:52:23 +0530 Subject: Hitcount updated --- PythonTBC/settings.py | 1 + PythonTBC/urls.py | 2 +- requirements.txt | 1 + tbc/templates/tbc/book-details.html | 23 +++++++++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/PythonTBC/settings.py b/PythonTBC/settings.py index 46131a9..bd0f0b8 100644 --- a/PythonTBC/settings.py +++ b/PythonTBC/settings.py @@ -136,6 +136,7 @@ INSTALLED_APPS = ( 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', + 'hitcount', 'tbc', 'comments', #'south', diff --git a/PythonTBC/urls.py b/PythonTBC/urls.py index 77d166a..9cae5d6 100644 --- a/PythonTBC/urls.py +++ b/PythonTBC/urls.py @@ -27,7 +27,7 @@ urlpatterns = [ url(r'^admin-tools/commenting', commentingapp.views.commenting, name = 'commenting'), url(r'^admin-tools/error_page', tbc_error_page.views.error, name = 'error_page'), url(r'^admin-tools/broken_page', tbc_error_page.views.broken, name = 'broken_page'), - + url(r'hitcount/', include('hitcount.urls', namespace='hitcount')), ] diff --git a/requirements.txt b/requirements.txt index ac72f30..ab8f58a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,3 +14,4 @@ wsgiref==0.1.2 scrapy==1.0.3 django-taggit django-taggit-templatetags2 +django-hitcount diff --git a/tbc/templates/tbc/book-details.html b/tbc/templates/tbc/book-details.html index fc67847..0119117 100644 --- a/tbc/templates/tbc/book-details.html +++ b/tbc/templates/tbc/book-details.html @@ -2,6 +2,24 @@ {% load static %} {% block script %} +{% load staticfiles %} + + +{% load hitcount_tags %} +{% get_hit_count_js_variables for book as hitcount %} +