{ "info": { "author": "Rodrigo Ristow", "author_email": "rodrigo@maxttor.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "\n==============================\ndjango-middleware-public-pages\n==============================\n\nUse this App to redirect the requests to 'public' alternative of the same view if the user is not logged in.\nFor example, if there are two views registered:\n - page_private (name=page1)\n - page_public (name=page1_pub)\nIf the user is not authenticated, the middleMiddleware will look for a url-name with the same name and the suffix '_pub' and redirect the request.\nIf the user is authenticated or the 'public' URL is not found, the Middleware has no effect.\n\n\nQuick start\n-----------\n\n1. Install the app:\n\n\n1. Add it to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = [\n ...\n 'django-middleware-public-pages',\n ]\n\n2. Add the middleware at the end of the list in settings::\n\n MIDDLEWARE_CLASSES = (\n ...\n \"django-middleware-public-pages\",\n )\n\n3. Configure two views, one for authenticated user e.g. page_private and another \n for anonymous or public (page_public)::\n\n urlpatterns += [\n url(\"^page_private/$\", views.Page1View.as_view(), name=\"page1\"),\n url(\"^page_public/$\", views.Page2View.as_view(), name=\"page1_pub\"),\n ...\n ]\n\nThe middleware will automaticaly redirect \"/page_private\" to \"/page_public\" if the user is not\nauthenticated.\nAttention: important is the name of the view and not the url-path.\n\nProject page - https://gitlab.com/rristow/django-middleware-public-pages.git\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/rristow/django-middleware-public-pages", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-middleware-public-pages", "package_url": "https://pypi.org/project/django-middleware-public-pages/", "platform": "", "project_url": "https://pypi.org/project/django-middleware-public-pages/", "project_urls": { "Homepage": "https://gitlab.com/rristow/django-middleware-public-pages" }, "release_url": "https://pypi.org/project/django-middleware-public-pages/0.16/", "requires_dist": null, "requires_python": "", "summary": "A django middleware to switch between public and protected versions of the same page (url).", "version": "0.16" }, "last_serial": 4441866, "releases": { "0.13": [ { "comment_text": "", "digests": { "md5": "dc7c2e9aa9edf531ed10423c409fddee", "sha256": "0e28d432830f9773301ddb688744b93f13a61847b02200db01e9d5fc102797f1" }, "downloads": -1, "filename": "django_middleware_public_pages-0.13-py3-none-any.whl", "has_sig": false, "md5_digest": "dc7c2e9aa9edf531ed10423c409fddee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3530, "upload_time": "2018-10-02T15:28:09", "url": "https://files.pythonhosted.org/packages/e9/7d/4c64b6c3624e435e081752794fbb3fb7fd7cd355ac140735df3460106d59/django_middleware_public_pages-0.13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ad6c138f992454baffa5e4640981cfb", "sha256": "aa323ae07aed44b0611677df7c452ab865f3ebea794341d4c605f378630aa779" }, "downloads": -1, "filename": "django-middleware-public-pages-0.13.tar.gz", "has_sig": false, "md5_digest": "7ad6c138f992454baffa5e4640981cfb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2500, "upload_time": "2018-10-02T15:28:10", "url": "https://files.pythonhosted.org/packages/d9/d2/3baad665d75e8079b74b391a293ef69bb78ecc454865989afaa783151e20/django-middleware-public-pages-0.13.tar.gz" } ], "0.14": [ { "comment_text": "", "digests": { "md5": "3a16a4914d2d214422d228055935ebe2", "sha256": "0fd2f8194cb8490203fa2666f65a0b948bea9eea23d5bf7503690260f94d172f" }, "downloads": -1, "filename": "django_middleware_public_pages-0.14-py3-none-any.whl", "has_sig": false, "md5_digest": "3a16a4914d2d214422d228055935ebe2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3549, "upload_time": "2018-10-02T15:42:17", "url": "https://files.pythonhosted.org/packages/1e/84/ecf36bec0bc661fce56e818a3be992e839a2680e35fd8bd5b70daf1200b0/django_middleware_public_pages-0.14-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47d55df9ced883f3b0bfd73c8e28ac98", "sha256": "a99e54aa3db5a27a59e898d1a8074708849efe3d00ada5d7f489ae9eda1b2769" }, "downloads": -1, "filename": "django-middleware-public-pages-0.14.tar.gz", "has_sig": false, "md5_digest": "47d55df9ced883f3b0bfd73c8e28ac98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2519, "upload_time": "2018-10-02T15:42:19", "url": "https://files.pythonhosted.org/packages/f7/1c/f671b2a3784b24ea5b28dd0d6da619ad6ae36197afa14e541aa022169dd9/django-middleware-public-pages-0.14.tar.gz" } ], "0.16": [ { "comment_text": "", "digests": { "md5": "c8f7f768da6061a9de9484980f91524a", "sha256": "1eecad4c06a880eed14aa8dd91fb85d90b35429c4b6862c365493721a7b2a5c3" }, "downloads": -1, "filename": "django_middleware_public_pages-0.16-py3-none-any.whl", "has_sig": false, "md5_digest": "c8f7f768da6061a9de9484980f91524a", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 3747, "upload_time": "2018-11-01T19:10:42", "url": "https://files.pythonhosted.org/packages/65/d4/bda11c62e039aa3fe27121c664eedf2bc6ee1c59e88e2f9bbb44fead923a/django_middleware_public_pages-0.16-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e0893aecb5ba981aa34bada60efef07", "sha256": "c20af28cff1ececc055f9852c8c872d1a149ba53985090dc27d3e5004702f792" }, "downloads": -1, "filename": "django-middleware-public-pages-0.16.tar.gz", "has_sig": false, "md5_digest": "4e0893aecb5ba981aa34bada60efef07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2658, "upload_time": "2018-11-01T19:10:40", "url": "https://files.pythonhosted.org/packages/7a/b6/1bc1d355e28c1244fefdb9b1b71dd8a82cf4748094f0c11bdfc6b1513d70/django-middleware-public-pages-0.16.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8f7f768da6061a9de9484980f91524a", "sha256": "1eecad4c06a880eed14aa8dd91fb85d90b35429c4b6862c365493721a7b2a5c3" }, "downloads": -1, "filename": "django_middleware_public_pages-0.16-py3-none-any.whl", "has_sig": false, "md5_digest": "c8f7f768da6061a9de9484980f91524a", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 3747, "upload_time": "2018-11-01T19:10:42", "url": "https://files.pythonhosted.org/packages/65/d4/bda11c62e039aa3fe27121c664eedf2bc6ee1c59e88e2f9bbb44fead923a/django_middleware_public_pages-0.16-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e0893aecb5ba981aa34bada60efef07", "sha256": "c20af28cff1ececc055f9852c8c872d1a149ba53985090dc27d3e5004702f792" }, "downloads": -1, "filename": "django-middleware-public-pages-0.16.tar.gz", "has_sig": false, "md5_digest": "4e0893aecb5ba981aa34bada60efef07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2658, "upload_time": "2018-11-01T19:10:40", "url": "https://files.pythonhosted.org/packages/7a/b6/1bc1d355e28c1244fefdb9b1b71dd8a82cf4748094f0c11bdfc6b1513d70/django-middleware-public-pages-0.16.tar.gz" } ] }