<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module dataplot.autosave</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="dataplot.html"><font color="#ffffff">dataplot</font></a>.autosave</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/autosave.pyc">/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/autosave.pyc</a></font></td></tr></table>
<p><tt>Auto-update mechanism for django-dataplot images.<br>
<br>
Use:<br>
from dataplot.cache import <a href="#PlotModel">PlotModel</a><br>
from django.db import models<br>
class YourModel(<a href="#PlotModel">PlotModel</a>,models.Model):</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="dataplot.html">dataplot</a><br>
</td><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="pdb.html">pdb</a><br>
</td><td width="25%" valign=top><a href="re.html">re</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="dataplot.autosave.html#PlotModel">PlotModel</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="dataplot.html#PlotError">dataplot.PlotError</a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="dataplot.autosave.html#DataplotImproperlyConfigured">DataplotImproperlyConfigured</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="DataplotImproperlyConfigured">class <strong>DataplotImproperlyConfigured</strong></a>(<a href="dataplot.html#PlotError">dataplot.PlotError</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="dataplot.autosave.html#DataplotImproperlyConfigured">DataplotImproperlyConfigured</a></dd>
<dd><a href="dataplot.html#PlotError">dataplot.PlotError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="DataplotImproperlyConfigured-__getitem__"><strong>__getitem__</strong></a>(...)</dt></dl>
<dl><dt><a name="DataplotImproperlyConfigured-__init__"><strong>__init__</strong></a>(...)</dt></dl>
<dl><dt><a name="DataplotImproperlyConfigured-__str__"><strong>__str__</strong></a>(...)</dt></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="PlotModel">class <strong>PlotModel</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Enables figure autosave with Django-dataplot.<br>
<br>
Specify which plots you want to remake by defining an init_plots<br>
method of your models subclass. Also make sure your subclass<br>
inherits from this class first, i.e.<br>
<br>
class Location(<a href="#PlotModel">PlotModel</a>,models.Model):<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="PlotModel-__init__"><strong>__init__</strong></a>(self, *posargs, **kwargs)</dt></dl>
<dl><dt><a name="PlotModel-init_dataplot"><strong>init_dataplot</strong></a>(self, plot)</dt><dd><tt>Initialize a dataplot using sensible defaults.<br>
<br>
This can be a<br>
<br>
dataplot (subclass of dataplot.GenericPlot, i.e. R.Scatter) in<br>
this case, we assume basename of scatter and a plot method<br>
called get_scatter_args.<br>
<br>
tuple (dataplot,dict) where dict is a dictionary of kwargs<br>
used to initialize the dataplot. So you can use this form if<br>
you want to override the default basename, get_plot_args<br>
method, or other plot parameters.</tt></dd></dl>
<dl><dt><a name="PlotModel-make_plots"><strong>make_plots</strong></a>(self)</dt><dd><tt>Try to remake plots related to this instance.<br>
<br>
This includes plots which are attributes of this model, and<br>
model-level plots which are attributes of this model's<br>
manager.</tt></dd></dl>
<dl><dt><a name="PlotModel-save"><strong>save</strong></a>(self)</dt><dd><tt>Save method which allows for maximum configurability.<br>
<br>
On a model with no custom save method, we will call django's<br>
save first, then try to make plots for this <a href="__builtin__.html#object">object</a>.<br>
<br>
On a model with a custom save method, you should call<br>
make_plots and Model.save yourself, depending on when it is<br>
appropriate in terms of your data processing.</tt></dd></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>__dict__</strong> = <dictproxy object><dd><tt>dictionary for instance variables (if defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of 'PlotModel' objects><dd><tt>list of weak references to the <a href="__builtin__.html#object">object</a> (if defined)</tt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>UNSAFE_FILE_CHARS</strong> = <_sre.SRE_Pattern object></td></tr></table>
</body></html>