{ "info": { "author": "42 Coffee Cups", "author_email": "contact@42cc.co", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python" ], "description": "=================================\nDjango X-File-Accel redirects app\n=================================\n\nThis app allowes you to protect static files served by nginx with authorization\nof your django project\n\nProtecting files\n================\n\nThis example will show how to protect 2 file positions from downloading:\n\n* {static_url}/files/fbi\n* {static_url}/files/cia\n\n\nIn this example we will assume that static url is /static/\n\nSteps to protect files:\n\n1. in nginx config disable access to desired locations:\n\n .. code-block:: nginx\n\n location /static/files/fbi {\n deny all;\n }\n location /static/files/cia {\n deny all;\n }\n\n2. Add internal path to serve this files.\n We will add \"root\" directory to serve both locations with one configuration option:\n\n .. code-block:: nginx\n\n # needed for x-file-accell\n location /internal/files/ {\n internal;\n alias $project_base/static/files/;\n }\n\n\n3. Configure x_file_accel_redirects app:\n\n 1. Set ``settings.X_FILE_ACCEL = True``.\n 2. add ``\"x_file_accel_redirects\"`` to ``settings.INSTALLED_APPS``.\n 3. Add app to your root url config, e.g.:\n\n .. code-block:: python\n\n urlpatterns += patterns('',\n (r'^protected/', include('x_file_accel_redirects.urls')),\n )\n\n 4. In django admin create new instance of x_file_accel_redirects.AccelRedirect with next values:\n\n * Description: anything meaningful.\n * URL prefix: any latin letters without slashes, e.g. \"downloads\".\n * Login required: True.\n * Internal path: \"/internal/files/\"\" (as specified in nginx config).\n * serve document root: optionaly you can specify path to directory with needed files\n to serve them with django staticfiles app when ``settings.X_FILE_ACCEL == False``.\n\nWhen everything is configured and restarted you will be able to get file\n``$project_base/static/files/fbi/secrets/ufo.txt`` by next url:\n\n``/protected/downloads/fbi/secrets/ufo.txt`` (/downloads/ if from \"prefix\" field of AccelRedirect)", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/42cc/django-x-file-accel/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/42cc/django-x-file-accel", "keywords": "ripple,api", "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "django-x_file_accel_redirects", "package_url": "https://pypi.org/project/django-x_file_accel_redirects/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-x_file_accel_redirects/", "project_urls": { "Download": "https://github.com/42cc/django-x-file-accel/archive/master.zip", "Homepage": "https://github.com/42cc/django-x-file-accel" }, "release_url": "https://pypi.org/project/django-x_file_accel_redirects/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Django app to easy configuration of multiple X-File-Accel locations", "version": "0.0.2" }, "last_serial": 1048949, "releases": { "0.0.1": [ { "comment_text": "built for Linux-3.11.0-17-lowlatency-x86_64-with", "digests": { "md5": "744024701e156fc2f1564aa71df67d28", "sha256": "03aa703f0d2450671edfb7a07febbdd631d78958366740432c26516b4c25dbd6" }, "downloads": -1, "filename": "django-x_file_accel_redirects-0.0.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "744024701e156fc2f1564aa71df67d28", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 8311, "upload_time": "2014-03-31T08:34:35", "url": "https://files.pythonhosted.org/packages/bc/56/ea317b3bd5b95bbd2643fb4e3427911ad35cba64744b8d00d34a50ea1bd6/django-x_file_accel_redirects-0.0.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "849e500ae35489ef8c6557a527fb4610", "sha256": "7b9e4d13411b18b9f5e065453065a3ad58fae1fd1d02a0b8a7c203588fe5292d" }, "downloads": -1, "filename": "django-x_file_accel_redirects-0.0.1.tar.gz", "has_sig": false, "md5_digest": "849e500ae35489ef8c6557a527fb4610", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5006, "upload_time": "2014-03-31T08:34:32", "url": "https://files.pythonhosted.org/packages/18/55/780c6132ef256564c26ae239d12db85947b4ea017adca2eb15ea7b96a224/django-x_file_accel_redirects-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "built for Linux-3.11.0-17-lowlatency-x86_64-with-glibc2.7", "digests": { "md5": "ce6ae5bc9411180726b1ff5357193a8e", "sha256": "7eb3512367442d489622acdb227c19bcab7193f2eeec9c944f59004b627377fe" }, "downloads": -1, "filename": "django-x_file_accel_redirects-0.0.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "ce6ae5bc9411180726b1ff5357193a8e", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 9079, "upload_time": "2014-04-02T13:42:34", "url": "https://files.pythonhosted.org/packages/65/5d/8e814fa9e546429df648678e3b9e84e33e8aadefe0f66c99b89b45d1f9c4/django-x_file_accel_redirects-0.0.2.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "6ccfcd20ff83152febe373c7d0c45bc7", "sha256": "91ee56dcf227fc64229dfa48faaeeef07c1cccc207ba83caa8e7d28dc31a12a8" }, "downloads": -1, "filename": "django-x_file_accel_redirects-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6ccfcd20ff83152febe373c7d0c45bc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5005, "upload_time": "2014-04-02T13:42:30", "url": "https://files.pythonhosted.org/packages/5d/1a/1f7eed74cbcc262b373f91e7cc01c5f83431776348da44de12d5bfa9ae65/django-x_file_accel_redirects-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-3.11.0-17-lowlatency-x86_64-with-glibc2.7", "digests": { "md5": "ce6ae5bc9411180726b1ff5357193a8e", "sha256": "7eb3512367442d489622acdb227c19bcab7193f2eeec9c944f59004b627377fe" }, "downloads": -1, "filename": "django-x_file_accel_redirects-0.0.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "ce6ae5bc9411180726b1ff5357193a8e", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 9079, "upload_time": "2014-04-02T13:42:34", "url": "https://files.pythonhosted.org/packages/65/5d/8e814fa9e546429df648678e3b9e84e33e8aadefe0f66c99b89b45d1f9c4/django-x_file_accel_redirects-0.0.2.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "6ccfcd20ff83152febe373c7d0c45bc7", "sha256": "91ee56dcf227fc64229dfa48faaeeef07c1cccc207ba83caa8e7d28dc31a12a8" }, "downloads": -1, "filename": "django-x_file_accel_redirects-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6ccfcd20ff83152febe373c7d0c45bc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5005, "upload_time": "2014-04-02T13:42:30", "url": "https://files.pythonhosted.org/packages/5d/1a/1f7eed74cbcc262b373f91e7cc01c5f83431776348da44de12d5bfa9ae65/django-x_file_accel_redirects-0.0.2.tar.gz" } ] }