sunlightlabs / django-popular

Experimental Django library for tracking popularity of objects with Google Analytics

This URL has Read+Write access

name age message
file LICENSE Thu Oct 29 07:29:12 -0700 2009 Revert "fix querystring bug and catch Resolver ... [jamesturk]
file README.rst Thu Oct 29 07:29:12 -0700 2009 Revert "fix querystring bug and catch Resolver ... [jamesturk]
directory popular/ Thu Oct 29 07:31:06 -0700 2009 bump version to 0.0.2 [jamesturk]
file setup.py Thu Oct 29 07:31:06 -0700 2009 bump version to 0.0.2 [jamesturk]
README.rst

django-popular

django-popular is highly experimental and not recommended for general use

A simple interface to use Google Analytics data to determine things like most popular blog posts. By associating a model with a Google Analytics compatible regex and an optional lookup function, it is possible to find the most popular instances of the registered model.

The current requirement to write an additional regex and function is acknowledged as sub-optimal, alternatives are welcome, though the limitations of the Google Analytics API make reusing the regex from the urlconf impossible.

Installation

You can obtain the latest release of django-popular via PyPI or check out the latest source

To install a source distribution:

python setup.py install

It is also possible to install django-popular with pip or easy_install.

In order to use the template tag, 'popular' must be added to your INSTALLED_APPS.

Usage

To be written once the API has stabilized, for now look at __init__.py and templatetags/popular.py.

Todo

  • explore non-google analytics options
  • reduce complexity in registering a new model