Coder Social home page Coder Social logo

django-admin-export's Introduction

This project is no longer active. Check out a fork at https://github.com/fgmacedo/django-export-action

django-admin-export

Generic export to XLSX/HTML/CSV action for the Django admin interface.

Meant for fast and simple exports and lets you choose the data to export.

Features

  • Drop in application
  • Traverse model relations recursively

django-admin-export is built with django-report-utils. For a a full query builder try using django-report-builder.

Install

  1. pip install django-admin-export
  2. Add admin_export to INSTALLED_APPS
  3. Add url(r'^admin_export/', include("admin_export.urls", namespace="admin_export")), to your project's urls.py

Usage

Go to any admin page, select fields, then select the export to xls action. Then check off any fields you want to export.

Running tests

  1. Acquire a checkout of the repository
  2. pip install -e . -r test_requirements.txt
  3. py.test tests

Security

This project assumes staff users are trusted. There may be ways for users to manipulate this project to get more data access than they should have.

django-admin-export's People

Contributors

akx avatar bufke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-admin-export's Issues

"ImportError: No module named openpyxl.workbook"

The above error occurs if you attempt to use django-admin-export as described in the README.

Technically, this is because django-report-utils doesn't have openpyxl as a dependency. However, since that project doesn't even have a README (which I interpet as "not a public project"), I'm adding an issue here.

Python 3 Support

Hi,

I got this error when I tried to export all rows (not fields)

Is this compatible with python3.4

python3/3.4.1/lib/python3.4/site-packages/admin_export/views.py in get_context_data
26: return dict(context.items() + field_data.items())

T.

Does django-admin-export take permissions into account?

Given a cursory read of the source, I didn't find anything that would prevent one from exporting all the data in the world if they are staff just by navigating to /admin_export/export_to_xls_related/....

I'd like to be proven wrong though :)

AttributeError

Request Method: POST
Request URL: http://127.0.0.1:8000/admin_export/export_to_xls/?ct=7&ids=1
Django Version: 1.5.5
Exception Type: AttributeError
Exception Value:
'Options' object has no attribute 'model_name'
Exception Location: C:\Users\user\AppData\Roaming\Python\Python27\site-packages\report_utils\mixins.py in report_to_list, line 189
Python Executable: C:\Python27\python.exe
Python Version: 2.7.6
Python Path:
['C:\Users\user\PycharmProjects\TestModelApp',
'C:\Python27\lib\site-packages\setuptools-1.1.5-py2.7.egg',
'C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg',
'C:\Windows\system32\python27.zip',
'C:\Python27\DLLs',
'C:\Python27\lib',
'C:\Python27\lib\plat-win',
'C:\Python27\lib\lib-tk',
'C:\Python27',
'C:\Users\user\AppData\Roaming\Python\Python27\site-packages',
'C:\Python27\lib\site-packages',
'C:\Python27\lib\site-packages\PIL']
Server time: sam, 12 Avr 2014 22:38:50 +0100

Suggestion regarding maintenance

Hi there,

I think group-based maintenance is a good idea as it's a hell of a lot easier to get people to contribute without the need for them accepting full responsibility for all eternity ;-)

It also makes transferring ownership much simpler and gives the project a 'forever' url.

I suggest we create a group specifically for this - so the project has the url: https://github.com/django-admin-export/django-admin-export

At that point you can ask people to become co-maintainers and see who steps up. I'm happy to play a part - time permitting.

Where do I select the fields?

Hi,

This looks very interesting but it is not working for me.

"Go to any admin page, select fields, then select the export to xls action. Then check off any fields you want to export."

Where do I do this? It would be nice if you can include screenshot examples.

T.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.