{ "info": { "author": "Akoha Inc.", "author_email": "adminmail@akoha.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "``django-randomfilenamestorage``\n================================\n\nA Django storage backend that gives random names to files.\n\nBy default, ``django.core.files.storage.FileSystemStorage`` deals with\nconflicting filenames by appending an underscore to the file. For\ninstance, if you try to create ``hello.txt`` when it already exists,\nit will rename it as ``hello_.txt``.\n\n``django-randomfilenamestorage`` creates random filenames, so if you\ntry to create ``hello.txt``, it will save it as\n``7z0a8m25sh9fyitx.txt``. Directory names and extensions are\npreserved, only the root filename is randomized.\n\nInstalling\n----------\n\nThe easiest way to install ``django-randomfilenamestorage`` is to use\n**pip**::\n\n pip install django-randomfilenamestorage\n\n\nQuick Start\n-----------\n\nIn your Django ``settings`` file:\n\n* Set ``DEFAULT_FILE_STORAGE`` to\n ``'django_randomfilenamestorage.storage.RandomFilenameFileSystemStorage'``\n\n* Optionally, add ``'django-dbstorage'`` to ``INSTALLED_APPS``\n\nThis gives you random filenames, backed on Django's\n``FileSystemStorage`` storage class.\n\n\n``RandomFilenameMetaStorage``\n-----------------------------\n\nYou can define a new underlying storage class by using\n``RandomFilenameMetaStorage`` to wrap it::\n\n from django.core.files.storage import get_storage_class\n\n from django_randomfilenamestorage.storage import RandomFilenameMetaStorage\n\n RandomFilenameMyStorage = RandomFilenameMetaStorage(\n storage_class=get_storage_class('myapp.storage.MyStorage'),\n )\n\nRandomFilenameMetaStorage defaults to 16-character root filenames. To\nchange the default, define\n``settings.RANDOM_FILENAME_LENGTH`` to a different integer\nvalue.\n\nTo change the filename length of a wrapped storage class, pass in a\n``length`` argument to ``RandomFilenameMetaStorage``. To override it\nfor a particular storage instance, pass in a ``randomfilename_length``\nargument to its constructor.\n\n\nEfficient random filename generation\n------------------------------------\n\nRandomFilenameMetaStorage is careful about not overwriting existing\nfiles, on creation. Unfortunately, many storage classes do not throw\nan ``OSError`` with ``EEXISTS`` when they detect a duplicate file on\n``_save()``. \n\nIf the underlying storage class accepts ``uniquify_names=False`` in\nits constructor, ``RandomFilenameMetaStorage`` will reduce the number\nof round-trips to the underlying storage class and make random\nfilename generation more efficient.\n\nSafe storage classes include:\n\n* ``django_randomfilenamestorage.storage.SafeFileSystemStorage``\n* `django-dbstorage`_.\n\n\n.. Links\n\n.. _django-dbstorage:\n http://pypi.python.org/pypi/django-dbstorage", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/akoha/django-randomfilenamestorage/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-randomfilenamestorage", "package_url": "https://pypi.org/project/django-randomfilenamestorage/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-randomfilenamestorage/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/akoha/django-randomfilenamestorage/" }, "release_url": "https://pypi.org/project/django-randomfilenamestorage/1.1/", "requires_dist": null, "requires_python": null, "summary": "A Django storage backend that gives random names to files.", "version": "1.1" }, "last_serial": 703194, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "28b95e20eeb8b9f13e849b99322c739e", "sha256": "51ea56ff6970364573b8739a163a0e3f229e2240ddb8899a2ce0d82e94490ef5" }, "downloads": -1, "filename": "django-randomfilenamestorage-1.1.tar.gz", "has_sig": false, "md5_digest": "28b95e20eeb8b9f13e849b99322c739e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6304, "upload_time": "2011-03-21T03:42:32", "url": "https://files.pythonhosted.org/packages/44/a7/6b74bc36e37a78e0798ff945e9b4af0520a5a097bae2222d377c32379d1a/django-randomfilenamestorage-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "28b95e20eeb8b9f13e849b99322c739e", "sha256": "51ea56ff6970364573b8739a163a0e3f229e2240ddb8899a2ce0d82e94490ef5" }, "downloads": -1, "filename": "django-randomfilenamestorage-1.1.tar.gz", "has_sig": false, "md5_digest": "28b95e20eeb8b9f13e849b99322c739e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6304, "upload_time": "2011-03-21T03:42:32", "url": "https://files.pythonhosted.org/packages/44/a7/6b74bc36e37a78e0798ff945e9b4af0520a5a097bae2222d377c32379d1a/django-randomfilenamestorage-1.1.tar.gz" } ] }