Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 807 Bytes

README.md

File metadata and controls

37 lines (29 loc) · 807 Bytes

Introduction

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

Quickstart

  1. Install from github or clone the repository:
    pip install git+git://github.com/renyi/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.