{"id":16060532,"url":"https://github.com/alir3z4/django-crequest","last_synced_at":"2025-04-13T06:41:28.641Z","repository":{"id":57419562,"uuid":"4420497","full_name":"Alir3z4/django-crequest","owner":"Alir3z4","description":"django-crequest - Taking care of current request in silent way.","archived":false,"fork":false,"pushed_at":"2018-05-11T09:38:09.000Z","size":23,"stargazers_count":60,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T22:46:04.728Z","etag":null,"topics":["authentication","django"],"latest_commit_sha":null,"homepage":"http://pypi.python.org/pypi/django-crequest","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alir3z4.png","metadata":{"files":{"readme":"README.rst","changelog":"ChangeLog.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-23T13:41:13.000Z","updated_at":"2025-01-17T22:42:20.000Z","dependencies_parsed_at":"2022-08-31T15:52:49.198Z","dependency_job_id":null,"html_url":"https://github.com/Alir3z4/django-crequest","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-crequest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-crequest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-crequest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-crequest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alir3z4","download_url":"https://codeload.github.com/Alir3z4/django-crequest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675434,"owners_count":21143763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","django"],"created_at":"2024-10-09T04:05:11.335Z","updated_at":"2025-04-13T06:41:28.621Z","avatar_url":"https://github.com/Alir3z4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===============\ndjango-crequest\n===============\n\n.. contents:: \n\nOverview\n========\n- ``crequest`` takes care of current ``request`` in silent way.\n- ``crequest`` will bring you current ``request`` object of your Django application from anywhere in your code.\n\nInstalling\n==========\n\n``django-crequest`` is available on http://pypi.python.org/pypi/django-crequest\nSo it can be installed it by pip::\n\n    $ python pip install django-crequest\n\nOr you can grab the latest version tarball and ::\n\n    $ python setup.py install\n\nTo enable ``django-crequest`` in your project\n\n* Add ``crequest`` to *INSTALLED_APPS* in your **settings.py**\n* Add ``crequest.middleware.CrequestMiddleware`` to ``MIDDLEWARE_CLASSES`` after the authentication and session middleware.\n\n\nSupported Python versions\n=========================\n\n``django-crequest`` currently can be run on multiple python versions:\n\n* Python 2\n* Python 3\n* PyPy\n\n\nHow to use\n==========\n\nFirst import the crequest's middleware::\n\n    from crequest.middleware import CrequestMiddleware\n\nGet the current ``request`` ;)::\n\n    current_request = CrequestMiddleware.get_request()\n\nDone.\n\nIn depth \u0026 Complex details\n==========================\n\nSet the current request in UnKnown situations::\n\n     CrequestMiddleware.set_request(request)\n\nReturn *iam_request* if there is no current request::\n\n    CrequestMiddleware.get_request(iam_request)\n\nAnd finally delete::\n\n    CrequestMiddleware.del_request()\n\nThe middleware automatically sets/deletes the current request for HTTP requests.\nFor other uses (management commands, scripts), you will need to do this yourself.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falir3z4%2Fdjango-crequest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falir3z4%2Fdjango-crequest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falir3z4%2Fdjango-crequest/lists"}