Coverage for lino/modlib/countries/__init__.py : 55%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Copyright 2008-2015 Luc Saffre # License: BSD (see file COPYING for details)
.. autosummary:: :toctree:
choicelists mixins models utils fixtures
See also :mod:`lino.modlib.statbel.countries`.
"""
"See :doc:`/dev/plugins`."
# settings:
"""The verbose_name of the region field."""
"""The 2-letter ISO code of the country where the site owner is located. This may not be empty, and there must be a country with that ISO code in :class:`lino.modlib.countries.models.Country`.
"""
raise Exception( "countries plugin requires a nonempty `country_code` setting.")
m = m.add_menu(self.app_label, self.verbose_name) m.add_action('countries.Countries') m.add_action('countries.Places')
"""Return the :class:`Country` instance configured by :attr:`country_code`.""" Country = self.site.modules.countries.Country try: return Country.objects.get(pk=self.country_code) except Country.DoesNotExist: return
|