{ "info": { "author": "Alireza Savand", "author_email": "alireza.savand@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Development Status :: 6 - Mature", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development", "Topic :: Software Development :: Libraries" ], "description": "=======================================================\ndjango-cuser - Take care of current user in silent way.\n=======================================================\n\n.. image:: https://travis-ci.org/Alir3z4/django-cuser.png\n :alt: travis-cli tests status for django-cuser\n :target: https://travis-ci.org/Alir3z4/django-cuser\n\n.. image:: http://badge.kloud51.com/pypi/w/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI Wheel\n\n.. image:: http://badge.kloud51.com/pypi/s/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI Status\n\n.. image:: http://badge.kloud51.com/pypi/l/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI License\n\n.. image:: http://badge.kloud51.com/pypi/f/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI Format\n\n.. image:: http://badge.kloud51.com/pypi/p/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI Py_versions\n\n.. image:: http://badge.kloud51.com/pypi/d/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI Downloads\n\n.. image:: http://badge.kloud51.com/pypi/i/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI Implementation\n\n.. image:: http://badge.kloud51.com/pypi/v/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI Version\n\n.. image:: http://badge.kloud51.com/pypi/e/django-cuser.svg\n :target: https://pypi.python.org/pypi/django-cuser\n :alt: PyPI Egg\n\n.. contents:: Table of contents\n\n\nOverview\n--------\n\ncuser will bring you Current user of your django application from anywhere in your code.\nI know, sounds fantastic ;)\n\n\nSupported Python versions\n-------------------------\n\n``django-cuser`` currently can be run on multiple python versions:\n\n* Python 2 (2.7)\n* Python 3 (3.4, 3.5)\n* PyPy\n\n\nInstalling\n----------\n\ndjango-cuser is also available at http://pypi.python.org/pypi/django-cuser\nSo it can be install it by pip or easy_install::\n\n $ pip install django-cuser\n\nOr you can grab the latest version tarball::\n\n $ python setup.py install\n\nTo enable django-cuser in your project\n\n* Add ``cuser`` to ``INSTALLED_APPS`` in your ``settings.py``\n* Add ``cuser.middleware.CuserMiddleware`` to ``MIDDLEWARE_CLASSES`` after the\n authentication and session middleware.\n\nWho is the current user\n-----------------------\n\nTo set/get the user info, there is the following API::\n\n from cuser.middleware import CuserMiddleware\n\nSet the current user for this thread. Accepts user objects and login names::\n\n CuserMiddleware.set_user(some_user)\n\nGet the current user or None::\n\n user = CuserMiddleware.get_user()\n\nThis will return some_user if there is no current user::\n\n user = CuserMiddleware.get_user(some_user)\n\nForget the current user. It is always safe to call this, even if there is no current user::\n\n CuserMiddleware.del_user()\n\nThe middleware automatically sets/deletes the current user for HTTP requests.\nFor other uses (management commands, scripts), you will need to do this\nyourself.\n\nCurrentUserField\n----------------\n\n``cuser`` also provides a ``CurrentUserField``, which can be used for auditing\npurposes. Use it as follows:\n\nfrom cuser.fields import CurrentUserField\n::\n\n class MyModel(models.Model):\n ....\n creator = CurrentUserField(add_only=True, related_name=\"created_mymodels\")\n last_editor = CurrentUserField(related_name=\"last_edited_mymodels\")\n ...\n\nThis field is a ``ForeignKey`` to the ``settings.AUTH_USER_MODEL`` model and you\ncan treat it as such.\n\n\nTests\n-----\n\n``django-cuser`` has been tested Django 1.8 and later. To run the the tests:\n\n::\n\n $ python manage.py test -v 2\n\nIt's also available on travis-ci:\n\nhttps://travis-ci.org/Alir3z4/django-cuser/\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Alir3z4/django-cuser", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-cuser", "package_url": "https://pypi.org/project/django-cuser/", "platform": "", "project_url": "https://pypi.org/project/django-cuser/", "project_urls": { "Homepage": "https://github.com/Alir3z4/django-cuser" }, "release_url": "https://pypi.org/project/django-cuser/2017.3.16/", "requires_dist": null, "requires_python": "", "summary": "Middleware to make user information always available.", "version": "2017.3.16" }, "last_serial": 2709259, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "6c9f65c0953ecaae7b8dff3a8db7a8c1", "sha256": "b5b463edcbccca78638b248e9767b3d0f6284750cabeed8fa86b0aa48ff094c4" }, "downloads": -1, "filename": "django-cuser-1.0.tar.gz", "has_sig": false, "md5_digest": "6c9f65c0953ecaae7b8dff3a8db7a8c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4406, "upload_time": "2012-05-14T14:04:28", "url": "https://files.pythonhosted.org/packages/9d/77/a49efa334ab4cb83311e4248d40f0e6979e9bf699822ea26ecb9bc88ef93/django-cuser-1.0.tar.gz" } ], "2014.6.21": [ { "comment_text": "", "digests": { "md5": "aece1ab6f86d4733fe9b454ba0c086c2", "sha256": "abbfd9cd8688f9b193583e58d6b6674f2f7408967f1fe05c2633f87d15bfb514" }, "downloads": -1, "filename": "django-cuser-2014.6.21.tar.gz", "has_sig": false, "md5_digest": "aece1ab6f86d4733fe9b454ba0c086c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4998, "upload_time": "2014-06-21T17:09:34", "url": "https://files.pythonhosted.org/packages/35/07/82c52a1b21ece9f00a6510991d6a5631c58969cd417e3d5f02b3dff00124/django-cuser-2014.6.21.tar.gz" } ], "2014.9.19": [ { "comment_text": "", "digests": { "md5": "f2036c2ac952964aab1c315085dd476c", "sha256": "08426b18934892bcaa4cce4f1e1b40f255573de3c36f12e07cf667f6c57030ec" }, "downloads": -1, "filename": "django-cuser-2014.9.19.tar.gz", "has_sig": false, "md5_digest": "f2036c2ac952964aab1c315085dd476c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5124, "upload_time": "2014-09-18T23:52:57", "url": "https://files.pythonhosted.org/packages/2f/5e/943470191b815daf02b86bbf866b4c1bb9859be4ed9b0ed6be0510df8189/django-cuser-2014.9.19.tar.gz" } ], "2014.9.28": [ { "comment_text": "", "digests": { "md5": "8fe7840e91bf9acfc66b842c8e87db20", "sha256": "25de3041e5bbcae37695ae51690429191ab0fee4ae36204ec5a65e8978597e49" }, "downloads": -1, "filename": "django-cuser-2014.9.28.tar.gz", "has_sig": false, "md5_digest": "8fe7840e91bf9acfc66b842c8e87db20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5696, "upload_time": "2014-09-28T05:02:47", "url": "https://files.pythonhosted.org/packages/dd/d2/2d84361233a49401dd256dece6c9bd223235137d50b8a5d18b00c0122d48/django-cuser-2014.9.28.tar.gz" } ], "2016.5.29": [ { "comment_text": "", "digests": { "md5": "a9c14b0a9b32e6e9cf4a0921038c0b54", "sha256": "c0c67323cbf1831e75a463534bbdba31f67a63aebc094333eb449f3d54f0c382" }, "downloads": -1, "filename": "django-cuser-2016.5.29.tar.gz", "has_sig": false, "md5_digest": "a9c14b0a9b32e6e9cf4a0921038c0b54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6128, "upload_time": "2016-05-29T16:08:58", "url": "https://files.pythonhosted.org/packages/06/44/0f1a91fd5a423b389c51d5627bb90485c91802142435dafc6c0d29c9079a/django-cuser-2016.5.29.tar.gz" } ], "2017.3.16": [ { "comment_text": "", "digests": { "md5": "647c6e09855ac791cf56017befa477b4", "sha256": "bf5c3b4f7f4c9fd583f81c3ef16e5ba9e819c70aa1f6a5e8452c784c0a7297ec" }, "downloads": -1, "filename": "django_cuser-2017.3.16-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "647c6e09855ac791cf56017befa477b4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12458, "upload_time": "2017-03-16T07:55:18", "url": "https://files.pythonhosted.org/packages/7d/7e/3005eb0a0b1f189ff9b6a8d23529bf46c7b8dfb1d4324275990792da3a29/django_cuser-2017.3.16-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cca6d69d5c33037db421bcc98ae1aee9", "sha256": "0d71bc8c4e48a452c7d3f86587b2f098ea30ff644d03bf193eba88302dd47060" }, "downloads": -1, "filename": "django-cuser-2017.3.16.tar.gz", "has_sig": false, "md5_digest": "cca6d69d5c33037db421bcc98ae1aee9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8258, "upload_time": "2017-03-16T07:55:06", "url": "https://files.pythonhosted.org/packages/1c/a5/d94654ce4c9cb4bc6fcae7746acfac44eb6fcceefd3754f49c716c692e95/django-cuser-2017.3.16.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "647c6e09855ac791cf56017befa477b4", "sha256": "bf5c3b4f7f4c9fd583f81c3ef16e5ba9e819c70aa1f6a5e8452c784c0a7297ec" }, "downloads": -1, "filename": "django_cuser-2017.3.16-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "647c6e09855ac791cf56017befa477b4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12458, "upload_time": "2017-03-16T07:55:18", "url": "https://files.pythonhosted.org/packages/7d/7e/3005eb0a0b1f189ff9b6a8d23529bf46c7b8dfb1d4324275990792da3a29/django_cuser-2017.3.16-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cca6d69d5c33037db421bcc98ae1aee9", "sha256": "0d71bc8c4e48a452c7d3f86587b2f098ea30ff644d03bf193eba88302dd47060" }, "downloads": -1, "filename": "django-cuser-2017.3.16.tar.gz", "has_sig": false, "md5_digest": "cca6d69d5c33037db421bcc98ae1aee9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8258, "upload_time": "2017-03-16T07:55:06", "url": "https://files.pythonhosted.org/packages/1c/a5/d94654ce4c9cb4bc6fcae7746acfac44eb6fcceefd3754f49c716c692e95/django-cuser-2017.3.16.tar.gz" } ] }