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.5 (2015-08-25)
Bugfixes
Fix installation error due to HISTORY.rst not being present in source.
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.5-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0fc61171856c7e0eb9d4a6aa3965b0be59462707793828a02ec12d666368b34 |
|
MD5 | 63b17b6181ec46a0b2c1af45a7eb4ce9 |
|
BLAKE2b-256 | 7ec2a19ad41ec2c076892b5842c7b880d034862776ac5659249208d5a352c30f |