Skip to main content

A simple Django app to build reports.

Project description

https://travis-ci.org/knowledge4life/django-onmydesk.svg?branch=develop Documentation Status https://badge.fury.io/py/django-onmydesk.svg https://img.shields.io/github/issues/knowledge4life/django-onmydesk.svg https://img.shields.io/badge/license-MIT-blue.svg https://coveralls.io/repos/github/knowledge4life/django-onmydesk/badge.svg?branch=develop

Django - OnMyDesk

A Django app to build reports in a simple way.

Installation

With pip:

pip install django-onmydesk

Add ‘onmydesk’ to your INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    'onmydesk',
]

Run ./manage.py migrate to create OnMyDesk models.

Quickstart

To create reports we need to follow just two steps:

  1. Create a report class in our django app.

  2. Add this report class to a config in you project settings to enable OnMyDesk to see your reports.

So, let’s do it!

Create a module called reports.py in you django app with the following content:

myapp/reports.py:

from onmydesk.core import reports

class UsersReport(reports.SQLReport):
    name = 'Users report'
    query = 'SELECT * FROM auth_user'

On your project settings, add the following config:

ONMYDESK_REPORT_LIST = [
    'myapp.reports.UsersReport',
]

Each new report must be added to this list. Otherwise, it won’t be shown on admin screen.

Now, access your OnMyDesk admin screen and you’ll see your Users report available on report creation screen.

After you create a report, it’ll be status settled up as ‘Pending’, to process it you must run process command. E.g:

$ ./manage.py process
Found 1 reports to process
Processing report #29 - 1 of 1
Report #29 processed

Collaboration

There are many ways of improving and adding more features, so feel free to collaborate with ideas, issues and/or pull requests.

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just create an issue and let us know if you have any questions or suggestion regarding the library

Project details


Download files

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

Source Distribution

django-onmydesk-0.1.0.tar.gz (22.8 kB view details)

Uploaded Source

File details

Details for the file django-onmydesk-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-onmydesk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 51df815e0504b49754216808c792c44d5db055de3b628e0cf9fb413c8ac7a44f
MD5 a25b3de5925765b0f4bcbf74aa9e7c4d
BLAKE2b-256 c813a9c63d6f02ac329cf7aee94cf88fcad7c1e86fcf472efd77de8d90eb6be8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page