Place names and other constants often used in web forms.



Return a list of all country names as tuples. The tuple value is the country’s 2-letter ISO code and its name; e.g., ("GB", "United Kingdom"). The countries are in name order.

Can be used like this:

import webhelpers.constants as constants
from webhelpers.html.tags import select
select("country", country_codes(),
    prompt="Please choose a country ...")

See here for more information: http://www.iso.org/iso/english_country_names_and_code_elements

States & Provinces


List of USA states.

Return a list of (abbreviation, name) for all US states, sorted by name. Includes the District of Columbia.


USA postal abbreviations for territories, protectorates, and military.

The return value is a list of (abbreviation, name) tuples. The locations are sorted by name.


List of Canadian provinces.

Return a list of (abbreviation, name) tuples for all Canadian provinces and territories, sorted by name.


Return a list of UK county names.


The timezone helpers were removed in WebHelpers 0.6. Install the PyTZ package if you need them.