Add some more "handler" docs
app handler, batch handlers, native batch types, people handler
This commit is contained in:
parent
0726a70192
commit
84477e5e36
30 changed files with 397 additions and 29 deletions
23
docs/base/handlers/app.rst
Normal file
23
docs/base/handlers/app.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
App Handler
|
||||
===========
|
||||
|
||||
There is one handler which corresponds to the app itself, whereas all
|
||||
other handlers correspond to some "portion" of the app. This main app
|
||||
handler's primary purpose is to:
|
||||
|
||||
- provide a common interface for obtaining all other handlers
|
||||
- provide some "global" methods, e.g. for rendering date/time values
|
||||
|
||||
You can override the main app handler, with config like:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[rattail]
|
||||
app.handler = poser.app:PoserAppHandler
|
||||
|
||||
Of course that must point to a valid ``AppHandler`` class, which you
|
||||
probably must create.
|
||||
|
||||
See also :class:`rattail:rattail.app.AppHandler` which is the default
|
||||
and base class.
|
15
docs/base/handlers/batch.rst
Normal file
15
docs/base/handlers/batch.rst
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
Batch Handlers
|
||||
==============
|
||||
|
||||
There is a handler for each unique "type" of batch which exists in the
|
||||
app. For instance the Pricing Batch has its own handler, and so does
|
||||
the Inventory Batch, and the Purchase Batch, and so on.
|
||||
|
||||
See :doc:`/data/batch/handlers` for some more background on these.
|
||||
|
||||
See :doc:`/data/batch/native/index` for a list of natively-supported
|
||||
batch types. (Again, there is a handler for each type.)
|
||||
|
||||
See also :class:`rattail:rattail.batch.handlers.BatchHandler` which is
|
||||
the base class for all batch handlers.
|
7
docs/base/handlers/import.rst
Normal file
7
docs/base/handlers/import.rst
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
Import Handlers
|
||||
===============
|
||||
|
||||
TODO
|
||||
|
||||
* :doc:`/data/importing/index`
|
24
docs/base/handlers/index.rst
Normal file
24
docs/base/handlers/index.rst
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
Handlers
|
||||
========
|
||||
|
||||
Rattail uses the concept of a "handler" to allow for two things primarily:
|
||||
|
||||
- customization of app logic without "forking" Rattail package(s)
|
||||
- keep logic in a "single" place which can be leverage by multiple UIs
|
||||
|
||||
The idea is that for various aspects of an app, there will be one and
|
||||
only one "handler" which is responsible for the business logic.
|
||||
Rattail usually comes with a default handler, which will be used
|
||||
unless you've created your own handler and configured it to be used
|
||||
instead.
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
app
|
||||
batch
|
||||
import
|
||||
other/index
|
5
docs/base/handlers/other/board.rst
Normal file
5
docs/base/handlers/other/board.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
Board Handler
|
||||
=============
|
||||
|
||||
TODO
|
5
docs/base/handlers/other/clientele.rst
Normal file
5
docs/base/handlers/other/clientele.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
Clientele Handler
|
||||
=================
|
||||
|
||||
TODO
|
5
docs/base/handlers/other/email.rst
Normal file
5
docs/base/handlers/other/email.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
Email Handler
|
||||
=============
|
||||
|
||||
TODO
|
5
docs/base/handlers/other/employment.rst
Normal file
5
docs/base/handlers/other/employment.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
Employment Handler
|
||||
==================
|
||||
|
||||
TODO
|
5
docs/base/handlers/other/feature.rst
Normal file
5
docs/base/handlers/other/feature.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
Feature Handler
|
||||
===============
|
||||
|
||||
TODO
|
20
docs/base/handlers/other/index.rst
Normal file
20
docs/base/handlers/other/index.rst
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
Other / Misc. Handlers
|
||||
======================
|
||||
|
||||
Here are some handlers which are specific to various aspects of the
|
||||
business logic, or a particular feature etc.
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
board
|
||||
clientele
|
||||
email
|
||||
employment
|
||||
feature
|
||||
people
|
||||
products
|
||||
report
|
19
docs/base/handlers/other/people.rst
Normal file
19
docs/base/handlers/other/people.rst
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
People Handler
|
||||
==============
|
||||
|
||||
This handler is responsible for business logic surrounding the
|
||||
:class:`~rattail:rattail.db.model.people.Person` model.
|
||||
|
||||
You can obtain a reference to the configured handler via
|
||||
:meth:`~rattail:rattail.app.AppHandler.get_people_handler`.
|
||||
|
||||
You may override the default handler with config like:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[rattail]
|
||||
people.handler = poser.people:PoserPeopleHandler
|
||||
|
||||
The default handler is :class:`rattail:rattail.people.PeopleHandler` -
|
||||
see its documentation for a list of methods you can override.
|
5
docs/base/handlers/other/products.rst
Normal file
5
docs/base/handlers/other/products.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
Products Handler
|
||||
================
|
||||
|
||||
TODO
|
7
docs/base/handlers/other/report.rst
Normal file
7
docs/base/handlers/other/report.rst
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
Report Handler
|
||||
==============
|
||||
|
||||
TODO
|
||||
|
||||
* :doc:`/data/reports/handler`
|
Loading…
Add table
Add a link
Reference in a new issue