]> scripts.mit.edu Git - wizard.git/blobdiff - doc/plugin.rst
Schlep around database handling functions to wizard.sql, add wizard.sql.drop hook.
[wizard.git] / doc / plugin.rst
index 3b4ba2369c0d5b026d2e42de1005380347ee007b..51e0536dd1d8483abdd187db22104259c5f8ef9c 100644 (file)
@@ -47,13 +47,15 @@ For more information on how to create an application, check
 
 
 
-.. _wizard.strategy:
+.. _wizard.install.strategy:
 
-``wizard.strategy``
--------------------
+``wizard.install.strategy``
+---------------------------
 
 Used during installation to automatically determine values for
-installation parameters the user may have omitted.
+installation parameters the user may have omitted.  Plugin should be a
+subclass of :class:`wizard.install.Strategy`.  The class that runs this
+plugin is :class:`wizard.install.ArgSchema`.
 
 
 
@@ -77,7 +79,20 @@ that runs this plugin is :func:`wizard.sql.auth`.
     If Wizard is able to determine the login credentials from the
     application's source files, these plugins will not be run.
 
+.. _wizard.sql.drop:
 
+``wizard.sql.drop``
+------------------------------
+
+Used to remove a SQL database, as might be done when an application is
+being uninstalled.  Plugin should be a function that takes a single
+required argument ``dsn``, which is a
+:class:`sqlalchemy.engine.url.URL` and should return either ``None`` if
+it was unable to delete the database, or ``True`` in the event of
+success.  This is a good plugin to implement if you don't give your
+users ``DROP DATABASE`` permissions, and instead they have to create and
+delete databases through another interface.  The function that runs this
+plugin is :func:`wizard.sql.drop`.
 
 .. _wizard.deploy.web: