Overview

django-last-used

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")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.