Skip to content

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

License

Notifications You must be signed in to change notification settings

renyi/django-pageviews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages