dataplot.autosave
index
/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/autosave.pyc

Auto-update mechanism for django-dataplot images.
 
Use:
from dataplot.cache import PlotModel
from django.db import models
class YourModel(PlotModel,models.Model):

 
Modules
       
dataplot
os
pdb
re

 
Classes
       
__builtin__.object
PlotModel
dataplot.PlotError(exceptions.Exception)
DataplotImproperlyConfigured

 
class DataplotImproperlyConfigured(dataplot.PlotError)
    
Method resolution order:
DataplotImproperlyConfigured
dataplot.PlotError
exceptions.Exception

Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)

 
class PlotModel(__builtin__.object)
    Enables figure autosave with Django-dataplot.
 
Specify which plots you want to remake by defining an init_plots
method of your models subclass. Also make sure your subclass
inherits from this class first, i.e.
 
class Location(PlotModel,models.Model):
 
  Methods defined here:
__init__(self, *posargs, **kwargs)
init_dataplot(self, plot)
Initialize a dataplot using sensible defaults.
 
This can be a
 
dataplot (subclass of dataplot.GenericPlot, i.e. R.Scatter) in
this case, we assume basename of scatter and a plot method
called get_scatter_args.
 
tuple (dataplot,dict) where dict is a dictionary of kwargs
used to initialize the dataplot. So you can use this form if
you want to override the default basename, get_plot_args
method, or other plot parameters.
make_plots(self)
Try to remake plots related to this instance.
 
This includes plots which are attributes of this model, and
model-level plots which are attributes of this model's
manager.
save(self)
Save method which allows for maximum configurability.
 
On a model with no custom save method, we will call django's
save first, then try to make plots for this object.
 
On a model with a custom save method, you should call
make_plots and Model.save yourself, depending on when it is
appropriate in terms of your data processing.

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'PlotModel' objects>
list of weak references to the object (if defined)

 
Data
        UNSAFE_FILE_CHARS = <_sre.SRE_Pattern object>