{
"info": {
"author": "Martin Mahner",
"author_email": "martin@mahner.org",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7"
],
"description": ".. image:: https://badge.fury.io/py/django-attachments.svg\n :target: https://badge.fury.io/py/django-attachments\n\n.. image:: https://travis-ci.org/bartTC/django-attachments.svg?branch=master\n :target: https://travis-ci.org/bartTC/django-attachments\n\n.. image:: https://api.codacy.com/project/badge/Grade/e13db6df2a2148b08c662798642aa611\n :alt: Codacy Badge\n :target: https://app.codacy.com/app/bartTC/django-attachments\n\n.. image:: https://api.codacy.com/project/badge/Coverage/e13db6df2a2148b08c662798642aa611\n :target: https://www.codacy.com/app/bartTC/django-attachments\n\n==================\ndjango-attachments\n==================\n\ndjango-attachments is a generic set of template tags to attach any kind of\nfiles to models.\n\nInstallation:\n=============\n\n1. Put ``attachments`` to your ``INSTALLED_APPS`` in your ``settings.py``\n within your django project::\n\n INSTALLED_APPS = (\n ...\n 'attachments',\n )\n\n2. Add the attachments urlpattern to your ``urls.py``::\n\n url(r'^attachments/', include('attachments.urls', namespace='attachments')),\n\n3. Migrate your database::\n\n ./manage.py migrate\n\n4. Grant the user some permissions:\n\n * For **adding attachments** grant the user (or group) the permission\n ``attachments.add_attachment``.\n\n * For **deleting attachments** grant the user (or group) the permission\n ``attachments.delete_attachment``. This allows the user to delete their\n attachments only.\n\n * For **deleting foreign attachments** (attachments by other users) grant\n the user the permission ``attachments.delete_foreign_attachments``.\n\n5. Set ``DELETE_ATTACHMENTS_FROM_DISK`` to ``True`` if you want to remove\n files from disk when Attachment objects are removed!\n\n6. Configure ``FILE_UPLOAD_MAX_SIZE`` (optional). This is the maximum size in\n bytes before raising form validation errors. If not set there is no restriction\n on file size.\n\nMind that you serve files!\n==========================\n\ndjango-attachments stores the files in your site_media directory and does not modify\nthem. For example, if an user uploads a .html file your webserver will probably display\nit in HTML. It's a good idea to serve such files as plain text. In a Apache2\nconfiguration this would look like::\n\n