Patrols

Note

This is a tested document, which means that you can re-play the instructions on this page in your own database, either interactively in a Django manage.py shell, or by writing a script and run it using manage.py run. It must be of course a Lino-Patrols application, installed as explained in Installing Lino-Patrols.

>>> from lino import startup
>>> startup('lino_patrols.settings.demo')
>>> from lino.api.doctest import *

The following statement imports a set of often-used global names:

>>> from lino.api.doctest import *

We can now refer to every installed app via it’s app_label. For example here are some simple Django operations to verify that the demo database is initialized:

>>> patrols.Patrol.objects.count()
50
>>> patrols.Area.objects.count()
4