{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "Django CSV Exports\n========================\n\nAn admin action that allows you to export your models as CSV files without\nhaving to write a single line of code --besides installation, of course.\n\nFeatures\n-----------------------------------\n\n- Easy installation\n- High level of customizability\n- Created with permissions in mind\n- Sane defaults\n\nInstallation\n----------------------------------\n\n- Python 2.7, 3.3+\n- `Django `_ >= 1.5\n\nTo install::\n\n pip install django-exports\n\nNext add `django_exports` to your `INSTALLED_APPS` to include the related css/js::\n\n INSTALLED_APPS = (\n # Other apps here\n 'django_csv_exports',\n )\n\n\nConfiguration\n-----------------------------------\nThere are two django settings that you can use to configure who can use the export action::\n\n # Use if you want to check user level permissions only users with the can_csv_\n # will be able to download csv files.\n DJANGO_EXPORTS_REQUIRE_PERM = True\n # Use if you want to disable the global django admin action. This setting is set to True by default.\n DJANGO_CSV_GLOBAL_EXPORTS_ENABLED = False\n\n\nFields to export\n---------------------------------\nBy default, all of the fields available in a model ar ordered and exported. You can override this behavior\nat the admin model level. Define the following attribute in your AdminModel::\n\n class ClientAdmin(CSVExportAdmin):\n csv_fields = ['first_name', 'last_name', 'email', 'phone_number',]\n\n\nPermission\n--------------------------------\nThere are two ways to limit who can export data as CSV files.\n\nModel level permissions: create a new model permission and assign it only to\nuser who should have access to the export action in the admin.\n\n class Client(models.Model):\n class Meta:\n permissions = ((\"can_csv_client\", \"Can export list of clients as CSV file\"),)\n\nAdminModel Level permissions: define a `has_csv_permission` and return True if a user should have access::\n\n class ClientAdmin(admin.AdminModel):\n search_fields = ('name', 'id', 'email')\n csv_fields = ['name', 'id']\n\n def has_csv_permission(self, request):\n \"\"\"Only super users can export as CSV\"\"\"\n if request.user.is_superuser:\n return True\n\n\nSelective Installation\n-------------------------\nSometimes, you don't want to allow all of your admin models to be exported. For this, you will need to\nset `DJANGO_CSV_GLOBAL_EXPORTS_ENABLED` to False, and have your AdminModels extend our `CSVExportAdmin`\nadmin class::\n\n from django_csv_exports.admin import CSVExportAdmin\n\n class ClientAdmin(CSVExportAdmin):\n pass\n\n\nRunning the Tests\n------------------------------------\n\nYou can run the tests with via::\n\n python setup.py test\n\nor::\n\n python runtests.py", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": null, "license": "", "maintainer": null, "maintainer_email": null, "name": "django-django_csv_exports", "package_url": "https://pypi.org/project/django-django_csv_exports/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-django_csv_exports/", "project_urls": { "Download": "UNKNOWN", "Homepage": "" }, "release_url": "https://pypi.org/project/django-django_csv_exports/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "", "version": "1.0.0" }, "last_serial": 1627832, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "0858952b6326e6d578ed5cbbb7edbfa7", "sha256": "5ed050d198d599ffbdfda110c7ddeb4cc2902845f6a4670dfe31cdbaf83b893c" }, "downloads": -1, "filename": "django-django_csv_exports-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0858952b6326e6d578ed5cbbb7edbfa7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4841, "upload_time": "2015-07-10T14:55:07", "url": "https://files.pythonhosted.org/packages/34/52/bc8515df1a9b939c48f25258113a6e70ce7a01a4b6bb7359130b25990001/django-django_csv_exports-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0858952b6326e6d578ed5cbbb7edbfa7", "sha256": "5ed050d198d599ffbdfda110c7ddeb4cc2902845f6a4670dfe31cdbaf83b893c" }, "downloads": -1, "filename": "django-django_csv_exports-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0858952b6326e6d578ed5cbbb7edbfa7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4841, "upload_time": "2015-07-10T14:55:07", "url": "https://files.pythonhosted.org/packages/34/52/bc8515df1a9b939c48f25258113a6e70ce7a01a4b6bb7359130b25990001/django-django_csv_exports-1.0.0.tar.gz" } ] }