SmallObligations product

  The purpose of the SmallObligations product is to support uses of Reportek
  that is not integrated with the central ROD. Reportek needs two lists
  from the obligations database. A list of localities - in ROD's case this
  is a list of countries, and a list of obligations.

  SmallObligations exists for the purpose of providing these two lists to
  Reportek over XML-RPC. But since we have the obligation in a database,
  it should contain some meaningful information about the obligation.

  Both localities and obligations have persistent globally unique IDs, of
  the form of a URI. This makes it possible for a Reportek-based website
  to import obligations from both the central ROD and the national ROD.


Small Locality:

  This is a simple object with only id, title and a list of email addresses
  that can be used to send out notifications.

Small Locality Folder:

  This is a simple folder. It only allows instances of Small Locality
  inside. It has an XML-RPC method that returns a list of localities
  with just id and title. If the Small Locality Folder is created as
  /localities in the website and there is a locality called "21" then the
  id returned in the XML-RPC method is <url-of-website>/localities/21

Small Obligation

  Similarly simple. 

  The small obligation depends on a script in the root folder that finds the localities.
  Here is a python script that expects you to have created a locality folder in
  /locations. It will then get the localities and sort them. This script is a
  python script and must be called 'localities_table'.

  def listsort(s1,s2):
      if s1['name'] > s2['name']:
          return 1
      elif s1['name'] < s2['name']:
          return -1
      else:
          return 0

  res = container.REQUEST.PARENTS[-1].locations.list_localities()
  res.sort(listsort)
  return res

Small Obligation Folder

  This is a simple folder. It only allows instances of Small Obligation
  inside. It also has an XML-RPC method that returns a list of obligations,
  but each obligation should also be grouped with the URL of the Small
  Obligation Folder

  The XML-RPC returns a list of dictionaries like;

  [{'TITLE': 'Air quality 3-year reporting obligation',
   'SOURCE_TITLE': '&lt;title of small obligations folder>',
   'PK_SOURCE_ID': '&lt;url-of-website>/obligations',
   'details_url': '&lt;url-of-website>/obligations/163'
   'uri': '&lt;url-of-website>/obligations/163'
   'PK_RA_ID': '163'},
  ]
