This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Keep trak of when a user has been last seen on a website. The last seen time is kept on the database

The app is ready for django 1.5, it uses the AUTH_USER_MODEL setting to get the user model,

Installation

  1. Install with pip install django-last-seen" or add "last_seen" directory to your Python path.
  2. Add "last_seen" to the INSTALLED_APPS tuple found in your settings file.
  3. Add ‘last_seen.middleware.LastSeenMiddleWare’ to MIDDLEWARE_CLASSES tuple found in your settings file.
  4. Run manage.py syncdb to create the new tables

Usage

To get when a user has been last seen:

from last_seen.model import LastSeen

seen = LastSeen.object.when(user=user)

To save a last seen user without the middleware:

from last_seen.model import LastSeen

# save with a special module
LastSeen.object.when(user=user, module='forum')

Middleware

The provided middleware keeps track of when an authenticated user has been last seen on the site,

If you want to keep track of a user last seen on a part of a site, you can use a special module name and use:

from last_seen.model import LastSeen

# save with a special module
LastSeen.object.when(user=user, module='forum')

Then to get the data:

from last_seen.model import LastSeen

# user last seen on any part of the site
seen = LastSeen.object.when(user=user)

# user last seen on a module
seen = LastSeen.object.when(user=user, module='forum')

Settings

LAST_SEEN_DEFAULT_MODULE
The default module used on the middleware. The default value is default.
LAST_SEEN_INTERVAL
How often is the last seen timestamp updated to the database. The default is 2 hours.
Release History

Release History

0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-last-seen-0.3.tar.gz (5.5 kB) Copy SHA256 Checksum SHA256 Source May 4, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting