Export CSV reports of database views.
Project description
Generate CSV reports by simply creating SQL views.
Authenticated staff members can then directly download these reports as CSV. It’s a nice agile way to deal with the changing requirements for reports.
Quick start
Include the gifts URLconf in your project urls.py like this:
url(r'^reports/', include('view_export.urls')),
Create an SQL view in your database:
=> CREATE VIEW v_staff AS ( -> SELECT first_name, last_name FROM auth_user -> WHERE is_staff = TRUE);
You’ll probably want to record this SQL in a file such as reports.sql or even better, add it to a Django migration.
Start the development server and visit http://127.0.0.1:8000/reports/staff/ or http://127.0.0.1:8000/reports/v_staff/ to download the SQL view named v_staff as a CSV file.
No settings are required by default and there’s no need to add the package to Django’s INSTALLED_APPS.
Release History
0.5.4 (2015-08-09)
Bugfixes
Fix SQL injection vulnerability relating to “view” argument.
0.5.3 (2015-08-05)
Improvements
Update documentation.
Rename PyPI package to django-view-export.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_view_export-0.5.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce21518917c5f21dc6f4c7a4e61831fa48a05f15be471eab875c1d1f7da05756 |
|
MD5 | ffeb17e13fb969363ea312653c5dcff2 |
|
BLAKE2b-256 | 6d0f4d8c5c74d14711293d2040d7877a7dec050d22ec2953ad66807a83594b23 |