{ "info": { "author": "Hiroaki Yamamoto", "author_email": "admin@hysoftware.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Ajax redirection middleware for Django\n\n[![Build Status](https://travis-ci.org/hysoftware/django-ajax-redirection.svg)](https://travis-ci.org/hysoftware/django-ajax-redirection)\n[![Code Health](https://landscape.io/github/hysoftware/django-ajax-redirection/master/landscape.svg?style=flat)](https://landscape.io/github/hysoftware/django-ajax-redirection/master)\n\n## What this?\nThis is a collection of useful middlware for Django with Ajax.\nFor example, [AngularJS](https://angularjs.org/) has URL routing subsystem,\nwhich uses AJAX. In addition, it supports history push state. This mean, when\nyou access the website with ```https://example.com/#/login```, the addressbar\nshows ```https://example.com/login```. However, accessing\n```https://example.com/login```, you will get 404, because the HTTP request\nis sent to ```https://example.com/login```, not ```https://example.com/#/login```.\nTo avoid this problem, we should redirect the route to\n```https://example.com/#/login```, when accessing ```https://example.com/login```.\n\nThis module provides middleware to avoid the problem.\n\n## How to use\n### Middleware\n1. Add ```dj_ajax_redirect.middleware.AjaxRedirectionMiddleware```\nto ```MIDDLEWARE_CLASSES``` on your setting.\n\n## Disable redirection\n### Middleware\nJust add a new item named \"DISABLE_REDIRECT\", of which type is list. i.e. just like this:\n\n~~~~\nDISABLE_REDIRECT = [\n r\"^path_to_disable_redirect/disable$\"\n]\n~~~~\n\nNote that static files are already added to disable list. Therefore, you don't need to add\nstatic urls.\n\nIn addition, *the strings are treated as regexp-s*.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://hysoftware.net", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-ajax-redirection", "package_url": "https://pypi.org/project/django-ajax-redirection/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-ajax-redirection/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://hysoftware.net" }, "release_url": "https://pypi.org/project/django-ajax-redirection/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Useful wrappers/middleware for django", "version": "1.0.0" }, "last_serial": 1479599, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "087f1d63afe30a12968db3a72b3996f3", "sha256": "2ce150d276451479d589f76bb2023ef416a6eedbecea2c2853e97d05c55df905" }, "downloads": -1, "filename": "django-ajax-redirection-1.0.0.tar.gz", "has_sig": true, "md5_digest": "087f1d63afe30a12968db3a72b3996f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4640, "upload_time": "2015-03-27T02:31:01", "url": "https://files.pythonhosted.org/packages/c7/b4/0a424dc5b4a8e4f8a664d495c1ffd1cd7de5848ac128998be0b7b566ed6a/django-ajax-redirection-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "087f1d63afe30a12968db3a72b3996f3", "sha256": "2ce150d276451479d589f76bb2023ef416a6eedbecea2c2853e97d05c55df905" }, "downloads": -1, "filename": "django-ajax-redirection-1.0.0.tar.gz", "has_sig": true, "md5_digest": "087f1d63afe30a12968db3a72b3996f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4640, "upload_time": "2015-03-27T02:31:01", "url": "https://files.pythonhosted.org/packages/c7/b4/0a424dc5b4a8e4f8a664d495c1ffd1cd7de5848ac128998be0b7b566ed6a/django-ajax-redirection-1.0.0.tar.gz" } ] }