From 17c51c125898f124040b109156bdc15fa4341c2a Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 3 May 2019 14:44:39 -0500 Subject: added analytics and offline support --- TODO | 9 +++++---- app/blog/views.py | 1 + design/templates/base.html | 34 ++++++++++++++++------------------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/TODO b/TODO index 0e2112e..7ce8907 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,10 @@ -* Libregraf: fix link feed so RSS reader opens source not my link * Libregraf: figure out archive structure for links (paginated? by date links to pages?) -* Libregraf: add robots.txt * Libregraf: fix sitemap bug -* Libregraf: add analytics -* Libregraf: set up email address comments@libregraf.net +* Libregraf: add awstats +* Libregraf: add awstats * Libregraf: migrate SRC to libregraf? DONE +* Libregraf: fix link feed so RSS reader opens source not my link +* Libregraf: add robots.txt +* Libregraf: set up email address comments@libregraf.net diff --git a/app/blog/views.py b/app/blog/views.py index 224decb..390d379 100644 --- a/app/blog/views.py +++ b/app/blog/views.py @@ -44,6 +44,7 @@ class HomePageView(ListView): template_name = "homepage.html" def get_queryset(self, **kwargs): + print(self.request.META.get('HTTP_X_FORWARDED_FOR', self.request.META.get('REMOTE_ADDR', '')).split(',')[-1].strip()) entry_list = Entry.objects.filter(status=1) link_list = Link.objects.filter(status=1) result_list = sorted( diff --git a/design/templates/base.html b/design/templates/base.html index 7e48bc5..20c9028 100644 --- a/design/templates/base.html +++ b/design/templates/base.html @@ -66,25 +66,23 @@ if (navigator.serviceWorker) { }); } - {%comment%} - - - - -{%endcomment%} - +{% endif %} -- cgit v1.2.3-70-g09d2