Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.329.012 Times

django-reporter 0.1

Company: Brandon Konkle
Date Added: August 26, 2013  |  Visits: 519

django-reporter

Report Broken Link
Printer Friendly Version


Product Homepage
Download (43 downloads)



Django-reporter<br /><br />A Django application to create automated email reports in .csv format. It includes a management command that is intended to be invoked periocically from cron.<br />Installation<br /><br />To install:<br /><br />pip install django-reporter<br /><br />Then add reporter to your INSTALLED_APPS:<br /><br />INSTALLED_APPS = (<br /> ...<br /> 'reporter',<br />)<br /><br />Also, make sure the email settings for your project are correct.<br />Creating Reports<br /><br />Similar to Django's admin app, reports are created within reports.py files inside your installed applications. Inside each reports.py should be at least one report that subclasses the reporter.BaseReport class. After the subclass is defined, use the reporter.register() function to register the report. Your subclass should define at least two attributes and implement a few methods, detailed below. Review the sample_reports.py file for an example of a simple report.<br />Required Attributes<br /><br />A basic report should have a docstring (which is shown with the --list-all option on the management command), and needs at least two attributes, name, and frequencies.<br /><br />For example, the sample report starts out with:<br /><br />class AdminLogReport(reporter.BaseReport):<br /> """<br /> Send full admin log info for the day, broken down by user<br /> """<br /> name = 'admin_log'<br /> frequencies = ['daily']<br /><br />name<br /><br />The name of the report, used when invoking the report management command.<br />frequencies<br /><br />The frequencies that this report is available for.<br />Built-in Attributes<br /><br />The base class automatically sets a number of attributes that are available in the subclass.<br />frequency<br /><br />The requested frequency of the report. This can be used to determine the correct date range to filter for in your report.<br />date<br /><br />The requested date for the report. Defaults to today if no date is provided.<br />tomorrow<br /><br />The requested date plus 1 day.<br />one_week<br /><br />The requested date minus 7 days.<br />one_month<br /><br />The requested date minus 32 days.<br />args<br /><br />A list of additional arguments passed on to the report from the management command.<br />Methods<br /><br />These methods are required to be implemented in your subclass in order to generate reports.<br />get_default_recipients<br /><br />This method is called by the base class's send_results method. It provides the default recipients for the email, which is used if the recipients are not overridden by the --recipients option on the management command. This should return a list of strings containing the email address of each recipient.<br />get_email_subject<br /><br />This method is also called by the base class's send_results method. It provides the subject line for the email that is sent. It should return a string.<br />get_data<br /><br />This is the method that the base class calls to retrieve the data that should be converted to csv and sent through email. This should return a list of rows, each row consisting of a list of fields.<br /><br />For example, in the sample admin_log report, a header row is defined at the top of the get_data method:<br /><br />data = [['Username', 'Time', 'Action', 'Content Type', 'ID', 'Name']]<br /><br />Then, for each row of data, a list of data within those fields is appended:<br /><br />data.append([log.user, time, actions[log.action_flag],<br /> log.content_type.name, log.object_id, obj_name])<br /><br />Registration<br /><br />Once the report is defined in the reports.py file, it's ready to be registered. The sample report registers its class at the bottom of the file:<br /><br />reporter.register(AdminLogReport)<br /><br />Running Reports<br /><br />To run reports, use the report management command.<br /><br />Usage:<br /><br />report [options] FREQUENCY REPORT_NAME [REPORT ARGS]<br /><br />Valid frequencies are "daily", "weekly", and "monthly". By default, the reports are emailed to the report's default recipients. This can be overridden through the --recipients option. Additional arguments after the report name will be passed to the report.<br />Options<br />-V, --view<br /><br />Send the data to stdout instead of emailing or saving to a file.<br />-f FILE, --filename=FILE<br /><br />Instead of emailing the results, save them to the provided filename.<br />-r RECIPIENTS, --recipients=RECIPIENTS<br /><br />Override the default recipients for the report. Seperate each email address with a comma. Do not use spaces.<br />-l, --list-all<br /><br />List all available reports, and then exit.<br />-d YYYY-MM-DD, --date=YYYY-MM-DD<br /><br />Provide a date to run the report for.<br /><br />#md5=ad2503b144a87a8befe1062acd3358f7

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Attributes Class Command Default Defined Django Django Reporter Email Frequencies Management Method Option Recipients Report Reporter Reports Reportspy Requested Sample Subclass
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


DJANGO-REPORTER RELATED
Network & Internet  -  django-templated-email 0.4.4
django-templated-email is oriented towards sending templated emails intended for use with transactional mailers (ala mailchimp, silverpop, etc.), but currently comes out of the box with a backend class which uses django's templating system, and...
10.24 KB  
File Utilities  -  django-view-cache-utils 0.1
django-view-cache-utils is a Django plugin that provides a method to do advanced view caching. It's basically a patch from http://code.djangoproject.com/ticket/11269 converted to stand-alone python package. The license is MIT.
10.24 KB  
Miscellaneous  -  Class with default method handler 1.0
This script is a class whose objects can handle undefined method calls, passing them on to a default handler.
 
Libraries  -  Class::Multimethods::Pure 0.13
Class::Multimethods::Pure is a Perl module that contains a method-ordered multimethod dispatch. SYNOPSIS use Class::Multimethods::Pure; package A; sub magic { rand() > 0.5 } package B; use base A; package C; use base A; BEGIN { multi...
15.36 KB  
Networking  -  LMB^Box WordPress Plugin API 0.2
A WordPress Plugin API class that allows plugin developers to have a standard management class for their plugin. All options and menu pages are handled through the plugin api class. I have included a test plugin to demonstrate usage of the API....
10 KB  
Business  -  perl fitness manager 0.1
Perl fitness manager is a simple command line program that allows you to keep track of fitness exercises and generate reports or overviews for weeks and months. The interface is simple and reasonably foolproof.
2.75 KB  
Modules  -  Actual Attribute Price 1.0
Actual Attribute Price is designed for those of us who would rather use a product attributes actual price rather than use a calculator to figure out the option priceExample:--------Tire APrice: $84.99Options: Size 1Size 2 ($89.99)Size 3...
 
Miscellaneous  -  Autosuper to the limit 1.1
This script returns a tuple (cls,self,method), where:  -  cls is the class in wich you can find the definition of the method from which this function is called;  -  self is the instance passed as first argument to the method from which this...
 
Network & Internet  -  django-cherry for Linux 0.1.2
django-cherry is a Django app which makes it easy to run your Django project under the [CherryPy WSGI server][cp-wsgi]. The main command is defined using [django-boss][djboss], a simple but powerful framework for creating and running Django...
10.24 KB  
HTML Utilities  -  django-secretballot 0.2.3
django-secretballot Django voting application that allows voting without a logged in user. Provides abstract base model for types that the user wishes to allow voting on as well as related utilities including generic views to...
10.24 KB  
NEW DOWNLOADS IN WEB AUTHORING, HTML UTILITIES
Web Authoring  -  django-compass 0.1
django-compass is a Django app that offers simple compilation of Compass projects. #md5=f8c46f23a0329cb77da8e35c14e3c54c
10.24 KB  
Web Authoring  -  django-debug-toolbar 0.9.1
jango-debug-toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content. Currently, the following panels have been...
143.36 KB  
Web Authoring  -  El Cid 0.2
El Cid is a cheezy little caller id program for Linux. Running as a background process, El Cid writes output into a comma seperated variable file. This is then parsed by other utilities such as elcgi.pl, which generates pages for viewing via the web.
51.2 KB  
Web Authoring  -  supercaptcha 0.1.1
supercaptcha is a Django plugin that adds a captcha field for the new forms. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. md5=7b1d933dbeeecc6f36c6c0c9cf3e71b2
10.24 KB  
Web Authoring  -  Camera Life 2.6.4 Beta 1
Camera Life is PHP software you can run to show your photos on your own website. Camera Life is easy to setup and customize if want to blend it in with the rest of your site. The two big features are: great photo organization, and a...
3.64 MB  
HTML Utilities  -  make-photo-pages 1.2
mpp.py is a free python program that generates static web albums (HTML) based on Google Picasa's export to XML feature or from a directory of pictures. It's 100% template based and supports i18n, exif and other features common on software of this...
686.08 KB  
HTML Utilities  -  MoonDragon API 2.0.1
Framework de desarrollo de aplicaciones web en PHP MoonDragon es una colecci?*N*n de herramientas y librer?*A*as que buscar facilitar el desarrollo de aplicaciones en php como sitios web, RIA's, Web Services y algunos otros.
122.88 KB  
HTML Utilities  -  typepad-motion 1.1.2
Motion is a Django application for community microblogging through the TypePad API. #md5=efa59c71ca774856fd25c8d727a7dde9
245.76 KB  
HTML Utilities  -  django-dajaxice 0.1.5
dajaxice is the communication core of dajaxproject. Its main goal is to trivialize the asynchronous communication within the django server side code and your js code. dajaxice is JS-framework agnostic and focuses on decoupling the...
10.24 KB  
HTML Utilities  -  django-picklefield 0.2.1
**django-picklefield** provides an implementation of a pickled object field. Such fields can contain any picklable objects. The implementation is taken and adopted from `Django snippet #1694 `_ by Taavi Taijala, which is in
10.24 KB