Skip to main content

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

  1. Include the gifts URLconf in your project like this:

    url(r'^reports/', include('view_export.urls')),
  2. 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.

  3. Start the development server and visit or 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)


  • Fix installation error due to HISTORY.rst not being present in source.

0.5.4 (2015-08-09)


  • Fix SQL injection vulnerability relating to “view” argument.

0.5.3 (2015-08-05)


  • Update documentation.
  • Rename PyPI package to django-view-export.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-view-export, version 0.5.5
Filename, size File type Python version Upload date Hashes
Filename, size django_view_export-0.5.5-py2-none-any.whl (5.9 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size django-view-export-0.5.5.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page