Skip to main content

Keep track of last used objects on a django app

Project description

Keep track of last used objects in a django app.

Installation

  1. Install with pip install django-last-used" or ddd "last_used" directory to your Python path.

  2. Add "last_used" to the INSTALLED_APPS tuple found in your settings file.

  3. Run manage.py syncdb to create the new tables

Usage

For save used objects:

import last_used

# save used object
last_used.use(object=item, user=user)

# save with a key
last_used.use(object=article, user=user, key="read")

last_used.use(object=article, user=user, key="seen")

For get last used objects:

import last_used

# get last used
last_used_articles = last_used.get(model=Article, user=user)

# get with a key
last_read_articles = last_used.get(model=Article, user=user, key="read")

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-last-used-0.1.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file django-last-used-0.1.tar.gz.

File metadata

File hashes

Hashes for django-last-used-0.1.tar.gz
Algorithm Hash digest
SHA256 50cbe0fdd1c4a6b352ddd043d248a84072673dfff816ecd9c1b0fb57022b93cc
MD5 7d9ad224bdd6cc8c79c7060b4a69b97e
BLAKE2b-256 48cf25fe8adaf29f619a16f28e09acad9a6675f9677fe1ac99b66fd481b368d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page