Commits

Ferran Pegueroles  committed 79e4bce

Add docs and setup file

  • Participants
  • Parent commits 748ab03

Comments (0)

Files changed (4)

+Ferran Pegueroles
+================
+django-last-used
+================
+
+Keep track of last used objects in a django app.
+
+Installation
+============
+
+#. Install with ``pip install django-last-used"`` or ddd ``"last_used"`` directory to your Python path.
+#. Add ``"last_used"`` to the ``INSTALLED_APPS`` tuple found in
+   your settings file.
+#. 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_aricles = last_used.get(model=Article, user=user)
+
+    # get with a key
+    last_read_aricles = last_used.get(model=Article, user=user, key="read")
+
+

File last_used/__init__.py

 
 from models import LastUsed, ContentType
 
+__author__ = u'Ferran Pegueroles'
+__copyright__ = u'Copyright 2013, Ferran Pegueroles'
+__credits__ = [u'Ferran Pegueroles']
+
+
+__license__ = 'GPL'
+__version__ = '0.1'
+__email__ = 'ferran@pegueroles.com'
+
+
 LIMIT = 10
 
 
+#!/usr/bin/env python
+
+from distutils.core import setup
+from currency_rates import __version__, __author__, __email__
+
+
+long_description = open('README.rst').read()
+
+
+setup(
+    name='django-last-used',
+    version=__version__,
+    url='http://bitbucket.org/ferranp/django-last-used',
+    author=__author__,
+    author_email=__email__,
+    license='GPL',
+    packages=['last_used'],
+    description='Keep track of last used objects on a django app',
+    long_description=long_description,
+    classifiers=['Development Status :: 5 - Production/Stable',
+                 'Environment :: Web Environment',
+                 'Framework :: Django',
+                 'Intended Audience :: Developers',
+                 'License :: OSI Approved :: GNU General Public License (GPL)',
+                 'Topic :: Internet :: WWW/HTTP :: Dynamic Content']
+)