Skip to content

jonykalavera/django-pageviews

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A very simple middleware based page view counter. It's sole purpose is to increment page views.

Why This Fork

I want to add ajax based tracking. - JK

Quickstart

  1. Install from github or clone the repository:
    pip install git+https://github.com/jonykalavera/django-pageviews.git
  1. Add 'pageviews' to INSTALLED_APPS.
    INSTALLED_APPS = (
        "...",
        "pageviews",
    )
  1. Add 'pageviews.middleware.PageViewsMiddleware' to MIDDLEWARE_CLASSES.
    MIDDLEWARE_CLASSES = (
        "...",
        "pageviews.middleware.PageViewsMiddleware"
    )
  1. Run 'python manage.py syncdb' or 'python manage.py migrate'.
    python manage.py migrate
  1. Add {% load pageviews_tags %} to templates.

  2. Insert {% pageviews %} or {% pageviews_url request.path %} to templates.

About

A very simple middleware based page view counter. It's sole purpose is to increment page views.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%