lino_xl.lib.countries

See countries : Countries and cities.

utils

Utilities for lino_xl.lib.countries.

fixtures

The fixtures for lino_xl.lib.countries.

(This module's source code is available here.)

Classes

Plugin(site, app_label, app_name, ...)

The countries plugin.

class lino_xl.lib.countries.Plugin(site, app_label, app_name, app_module, needed_by)

Bases: lino.core.plugin.Plugin

The countries plugin.

hide_region = False

Whether to hide the region field in postal addresses. Set this to True if you live in a country like Belgium. Belgium is --despite their constant language disputes-- obviously a very united country since they don't need a region field when entering a postal address. In Belgium, when you write a letter, you just say the zip code and name of the city. In many other countries there is a mandatory intermediate field.

country_code = 'BE'

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 lino_xl.lib.countries.models.Country.

municipality_type = '50'

The place type to be considered as administrativ municipality.

See lino_xl.lib.courses.CountryCity.municipality

get_my_country()

Return the Country instance configured by country_code.