lck.django 0.8.5 documentation

This Page

lck.django.choices

Note

The legacy lck.django.choices namespace will be removed in lck.django 1.0. Use dj.choices.

Classes

class Choices(filter=(<object object at 0x102dabb30>, ), item=<object object at 0x102dabb30>, grouped=False)

Creates a list of pairs from the specified Choices class. By default, each pair consists of a numeric ID and the translated description. If use_ids is False, the name of the attribute is used instead of the numeric ID.

If filter is specified, it’s a set or sequence of attribute names that should be included in the list. Note that the numeric IDs are the same regardless of the filtering. This is useful for predefining a large set of possible values and filtering to only the ones which are currently implemented.

classmethod from_name(name, fallback=unset) → choice object

Given the name, returns the choice object. Unless fallback is set, raises ValueError if name not present.

classmethod id_from_name(name, fallback=unset) → id

Given the name, returns the id. Unless fallback is set, raises ValueError if name not present.

classmethod desc_from_name(name, fallback=unset) → localized description string

Given the name, returns the localized description string. Unless fallback is set, raises ValueError if name not present.

classmethod raw_from_name(name, fallback=unset) → raw description string

Given the name, returns the raw description string. Unless fallback is set, raises ValueError if name not present.

classmethod from_id(id, fallback=unset) → choice object

Given the id, returns the choice object. Unless fallback is set, raises ValueError if name not present.

classmethod name_from_id(id, fallback=unset) → attribute name

Given the id, returns the attribute name. Unless fallback is set, raises ValueError if name not present.

classmethod desc_from_id(id, fallback=unset) → localized description string

Given the id, returns the localized description string. Unless fallback is set, raises ValueError if name not present.

classmethod raw_from_id(id, fallback=unset) → raw description string

Given the id, returns the raw description string. Unless fallback is set, raises ValueError if name not present.

static to_ids(func)

Converts a sequence of choices to a sequence of choice IDs.

static to_names(func)

Converts a sequence of choices to a sequence of choice names.

Choice

alias of Choice

Group

alias of ChoiceGroup

classmethod FromName(id, fallback=<object object at 0x102dabb30>)

Choices.from_name(name, fallback=unset) -> choice object

Given the name, returns the choice object. Unless fallback is set, raises ValueError if name not present.

classmethod IDFromName(id, fallback=<object object at 0x102dabb30>)

Choices.id_from_name(name, fallback=unset) -> id

Given the name, returns the id. Unless fallback is set, raises ValueError if name not present.

classmethod DescFromName(id, fallback=<object object at 0x102dabb30>)

Choices.desc_from_name(name, fallback=unset) -> localized description string

Given the name, returns the localized description string. Unless fallback is set, raises ValueError if name not present.

classmethod RawFromName(id, fallback=<object object at 0x102dabb30>)

Choices.raw_from_name(name, fallback=unset) -> raw description string

Given the name, returns the raw description string. Unless fallback is set, raises ValueError if name not present.

classmethod FromID(id, fallback=<object object at 0x102dabb30>)

Choices.from_id(id, fallback=unset) -> choice object

Given the id, returns the choice object. Unless fallback is set, raises ValueError if name not present.

classmethod NameFromID(id, fallback=<object object at 0x102dabb30>)

Choices.name_from_id(id, fallback=unset) -> attribute name

Given the id, returns the attribute name. Unless fallback is set, raises ValueError if name not present.

classmethod DescFromID(id, fallback=<object object at 0x102dabb30>)

Choices.desc_from_id(id, fallback=unset) -> localized description string

Given the id, returns the localized description string. Unless fallback is set, raises ValueError if name not present.

classmethod RawFromID(id, fallback=<object object at 0x102dabb30>)

Choices.raw_from_id(id, fallback=unset) -> raw description string

Given the id, returns the raw description string. Unless fallback is set, raises ValueError if name not present.

static ToIDs(func)

Converts a sequence of choices to a sequence of choice IDs.

static ToNames(func)

Converts a sequence of choices to a sequence of choice names.

class Choice(description, id=-255, name=None)

A single choice.

bit_length

int.bit_length() -> int

Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6

conjugate

Returns self, the complex conjugate of any int.

denominator

the denominator of a rational number in lowest terms

extra(**other)

Enables adding custom attributes to choices at declaration time. For example:

class Color(Choices):
    _ = Choices.Choice

    red = _("red").extra(html='#ff0000')
    green = _("green").extra(html='#00ff00')
    blue = _("blue").extra(html='#0000ff')

Later on you can use the defined attribute directly:

>>> Color.red.html
'#ff0000'

or with choices received using the getters:

>>> Color.from_name(request.POST['color']).html
'#00ff00'
imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

class ChoiceGroup(id, description=u'')

A group of choices.

bit_length

int.bit_length() -> int

Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6

conjugate

Returns self, the complex conjugate of any int.

denominator

the denominator of a rational number in lowest terms

extra(**other)

Enables adding custom attributes to choices at declaration time. For example:

class Color(Choices):
    _ = Choices.Choice

    red = _("red").extra(html='#ff0000')
    green = _("green").extra(html='#00ff00')
    blue = _("blue").extra(html='#0000ff')

Later on you can use the defined attribute directly:

>>> Color.red.html
'#ff0000'

or with choices received using the getters:

>>> Color.from_name(request.POST['color']).html
'#00ff00'
imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

Predefined Choices

class Country(filter=(<object object at 0x102dabb30>, ), item=<object object at 0x102dabb30>, grouped=False)

Specifies a set for all countries of the world (as of January 2011), including unions, parts of United Kingdom and unrecognized states.

COUNTRIES = <ChoiceGroup: COUNTRIES (id: 0)>

Officially recognized states, as of January 2011.

af = <Choice: Afghanistan (id: 1, name: af)>
al = <Choice: Albania (id: 2, name: al)>
dz = <Choice: Algeria (id: 3, name: dz)>
as_ = <Choice: American Samoa (id: -255, name: as)>
ad = <Choice: Andorra (id: 5, name: ad)>
ao = <Choice: Angola (id: 6, name: ao)>
ai = <Choice: Anguilla (id: 7, name: ai)>
aq = <Choice: Antarctica (id: 8, name: aq)>
ag = <Choice: Antigua and Barbuda (id: 9, name: ag)>
ar = <Choice: Argentina (id: 10, name: ar)>
am = <Choice: Armenia (id: 11, name: am)>
aw = <Choice: Aruba (id: 12, name: aw)>
au = <Choice: Australia (id: 13, name: au)>
at = <Choice: Austria (id: 14, name: at)>
az = <Choice: Azerbaijan (id: 15, name: az)>
bs = <Choice: Bahamas (id: 16, name: bs)>
bh = <Choice: Bahrain (id: 17, name: bh)>
bd = <Choice: Bangladesh (id: 18, name: bd)>
bb = <Choice: Barbados (id: 19, name: bb)>
by = <Choice: Belarus (id: 20, name: by)>
be = <Choice: Belgium (id: 21, name: be)>
bz = <Choice: Belize (id: 22, name: bz)>
bj = <Choice: Benin (id: 23, name: bj)>
bm = <Choice: Bermuda (id: 24, name: bm)>
bt = <Choice: Bhutan (id: 25, name: bt)>
bo = <Choice: Bolivia (id: 26, name: bo)>
ba = <Choice: Bosnia and Herzegovina (id: 27, name: ba)>
bw = <Choice: Botswana (id: 28, name: bw)>
br = <Choice: Brazil (id: 29, name: br)>
bn = <Choice: Brunei (id: 30, name: bn)>
bg = <Choice: Bulgaria (id: 31, name: bg)>
bf = <Choice: Burkina Faso (id: 32, name: bf)>
bi = <Choice: Burundi (id: 33, name: bi)>
kh = <Choice: Cambodia (id: 34, name: kh)>
cm = <Choice: Cameroon (id: 35, name: cm)>
ca = <Choice: Canada (id: 36, name: ca)>
cv = <Choice: Cape Verde (id: 37, name: cv)>
ky = <Choice: Cayman Islands (id: 38, name: ky)>
cf = <Choice: Central African Republic (id: 39, name: cf)>
td = <Choice: Chad (id: 40, name: td)>
cl = <Choice: Chile (id: 41, name: cl)>
cn = <Choice: China (id: 42, name: cn)>
co = <Choice: Colombia (id: 43, name: co)>
km = <Choice: Comoros (id: 44, name: km)>
cg = <Choice: Congo Brazzaville (id: 45, name: cg)>
cd = <Choice: Congo Kinshasa (id: 46, name: cd)>
ck = <Choice: Cook Islands (id: 47, name: ck)>
cr = <Choice: Costa Rica (id: 48, name: cr)>
ci = <Choice: Cote Divoire (id: 49, name: ci)>
hr = <Choice: Croatia (id: 50, name: hr)>
cu = <Choice: Cuba (id: 51, name: cu)>
cy = <Choice: Cyprus (id: 52, name: cy)>
cz = <Choice: Czech Republic (id: 53, name: cz)>
dk = <Choice: Denmark (id: 54, name: dk)>
dj = <Choice: Djibouti (id: 55, name: dj)>
dm = <Choice: Dominica (id: 56, name: dm)>
do = <Choice: Dominican Republic (id: 57, name: do)>
ec = <Choice: Ecuador (id: 58, name: ec)>
eg = <Choice: Egypt (id: 59, name: eg)>
sv = <Choice: El Salvador (id: 60, name: sv)>
gq = <Choice: Equatorial Guinea (id: 61, name: gq)>
er = <Choice: Eritrea (id: 62, name: er)>
ee = <Choice: Estonia (id: 63, name: ee)>
et = <Choice: Ethiopia (id: 64, name: et)>
fo = <Choice: Faroe Islands (id: 65, name: fo)>
fj = <Choice: Fiji (id: 66, name: fj)>
fi = <Choice: Finland (id: 67, name: fi)>
fr = <Choice: France (id: 68, name: fr)>
pf = <Choice: French Polynesia (id: 69, name: pf)>
ga = <Choice: Gabon (id: 70, name: ga)>
gm = <Choice: Gambia (id: 71, name: gm)>
ge = <Choice: Georgia (id: 72, name: ge)>
de = <Choice: Germany (id: 73, name: de)>
gh = <Choice: Ghana (id: 74, name: gh)>
gi = <Choice: Gibraltar (id: 75, name: gi)>
gr = <Choice: Greece (id: 76, name: gr)>
gd = <Choice: Grenada (id: 77, name: gd)>
gu = <Choice: Guam (id: 78, name: gu)>
gt = <Choice: Guatemala (id: 79, name: gt)>
gw = <Choice: Guinea Bissau (id: 80, name: gw)>
gn = <Choice: Guinea (id: 81, name: gn)>
gy = <Choice: Guyana (id: 82, name: gy)>
ht = <Choice: Haiti (id: 83, name: ht)>
hn = <Choice: Honduras (id: 84, name: hn)>
hk = <Choice: Hong Kong (id: 85, name: hk)>
hu = <Choice: Hungary (id: 86, name: hu)>
is_ = <Choice: Iceland (id: -255, name: is)>
in_ = <Choice: India (id: -255, name: in)>
id = <Choice: Indonesia (id: 89, name: id)>
ir = <Choice: Iran (id: 90, name: ir)>
iq = <Choice: Iraq (id: 91, name: iq)>
ie = <Choice: Ireland (id: 92, name: ie)>
il = <Choice: Israel (id: 93, name: il)>
it = <Choice: Italy (id: 94, name: it)>
jm = <Choice: Jamaica (id: 95, name: jm)>
jp = <Choice: Japan (id: 96, name: jp)>
je = <Choice: Jersey (id: 97, name: je)>
jo = <Choice: Jordan (id: 98, name: jo)>
kz = <Choice: Kazakhstan (id: 99, name: kz)>
ke = <Choice: Kenya (id: 100, name: ke)>
ki = <Choice: Kiribati (id: 101, name: ki)>
kw = <Choice: Kuwait (id: 102, name: kw)>
kg = <Choice: Kyrgyzstan (id: 103, name: kg)>
la = <Choice: Laos (id: 104, name: la)>
lv = <Choice: Latvia (id: 105, name: lv)>
lb = <Choice: Lebanon (id: 106, name: lb)>
ls = <Choice: Lesotho (id: 107, name: ls)>
lr = <Choice: Liberia (id: 108, name: lr)>
ly = <Choice: Libya (id: 109, name: ly)>
li = <Choice: Liechtenstein (id: 110, name: li)>
lt = <Choice: Lithuania (id: 111, name: lt)>
lu = <Choice: Luxembourg (id: 112, name: lu)>
mo = <Choice: Macau (id: 113, name: mo)>
mk = <Choice: Macedonia (id: 114, name: mk)>
mg = <Choice: Madagascar (id: 115, name: mg)>
mw = <Choice: Malawi (id: 116, name: mw)>
my = <Choice: Malaysia (id: 117, name: my)>
mv = <Choice: Maldives (id: 118, name: mv)>
ml = <Choice: Mali (id: 119, name: ml)>
mt = <Choice: Malta (id: 120, name: mt)>
mh = <Choice: Marshall Islands (id: 121, name: mh)>
mr = <Choice: Mauritania (id: 122, name: mr)>
mu = <Choice: Mauritius (id: 123, name: mu)>
mx = <Choice: Mexico (id: 124, name: mx)>
fm = <Choice: Micronesia (id: 125, name: fm)>
md = <Choice: Moldova (id: 126, name: md)>
mc = <Choice: Monaco (id: 127, name: mc)>
mn = <Choice: Mongolia (id: 128, name: mn)>
me = <Choice: Montenegro (id: 129, name: me)>
ms = <Choice: Montserrat (id: 130, name: ms)>
ma = <Choice: Morocco (id: 131, name: ma)>
mz = <Choice: Mozambique (id: 132, name: mz)>
mm = <Choice: Myanmar (id: 133, name: mm)>
na = <Choice: Namibia (id: 134, name: na)>
nr = <Choice: Nauru (id: 135, name: nr)>
np = <Choice: Nepal (id: 136, name: np)>
an = <Choice: Netherlands Antilles (id: 137, name: an)>
nl = <Choice: Netherlands (id: 138, name: nl)>
nz = <Choice: New Zealand (id: 139, name: nz)>
ni = <Choice: Nicaragua (id: 140, name: ni)>
ne = <Choice: Niger (id: 141, name: ne)>
ng = <Choice: Nigeria (id: 142, name: ng)>
kp = <Choice: North Korea (id: 143, name: kp)>
no = <Choice: Norway (id: 144, name: no)>
om = <Choice: Oman (id: 145, name: om)>
pk = <Choice: Pakistan (id: 146, name: pk)>
pw = <Choice: Palau (id: 147, name: pw)>
pa = <Choice: Panama (id: 148, name: pa)>
pg = <Choice: Papua New Guinea (id: 149, name: pg)>
py = <Choice: Paraguay (id: 150, name: py)>
pe = <Choice: Peru (id: 151, name: pe)>
ph = <Choice: Philippines (id: 152, name: ph)>
pl = <Choice: Poland (id: 153, name: pl)>
pt = <Choice: Portugal (id: 154, name: pt)>
pr = <Choice: Puerto Rico (id: 155, name: pr)>
qa = <Choice: Qatar (id: 156, name: qa)>
ro = <Choice: Romania (id: 157, name: ro)>
ru = <Choice: Russian Federation (id: 158, name: ru)>
rw = <Choice: Rwanda (id: 159, name: rw)>
lc = <Choice: Saint Lucia (id: 160, name: lc)>
ws = <Choice: Samoa (id: 161, name: ws)>
sm = <Choice: San Marino (id: 162, name: sm)>
st = <Choice: Sao Tome and Principe (id: 163, name: st)>
sa = <Choice: Saudi Arabia (id: 164, name: sa)>
sn = <Choice: Senegal (id: 165, name: sn)>
rs = <Choice: Serbia (id: 166, name: rs)>
sc = <Choice: Seychelles (id: 167, name: sc)>
sl = <Choice: Sierra Leone (id: 168, name: sl)>
sg = <Choice: Singapore (id: 169, name: sg)>
sk = <Choice: Slovakia (id: 170, name: sk)>
si = <Choice: Slovenia (id: 171, name: si)>
sb = <Choice: Solomon Islands (id: 172, name: sb)>
so = <Choice: Somalia (id: 173, name: so)>
za = <Choice: South Africa (id: 174, name: za)>
kr = <Choice: South Korea (id: 175, name: kr)>
es = <Choice: Spain (id: 176, name: es)>
lk = <Choice: Sri Lanka (id: 177, name: lk)>
kn = <Choice: St Kitts and Nevis (id: 178, name: kn)>
vc = <Choice: St Vincent and the Grenadines (id: 179, name: vc)>
sd = <Choice: Sudan (id: 180, name: sd)>
sr = <Choice: Suriname (id: 181, name: sr)>
sz = <Choice: Swaziland (id: 182, name: sz)>
se = <Choice: Sweden (id: 183, name: se)>
ch = <Choice: Switzerland (id: 184, name: ch)>
sy = <Choice: Syria (id: 185, name: sy)>
tj = <Choice: Tajikistan (id: 186, name: tj)>
tw = <Choice: Taiwan (id: 187, name: tw)>
tz = <Choice: Tanzania (id: 188, name: tz)>
th = <Choice: Thailand (id: 189, name: th)>
tl = <Choice: Timor Leste (id: 190, name: tl)>
tg = <Choice: Togo (id: 191, name: tg)>
to = <Choice: Tonga (id: 192, name: to)>
tt = <Choice: Trinidad and Tobago (id: 193, name: tt)>
tn = <Choice: Tunisia (id: 194, name: tn)>
tr = <Choice: Turkey (id: 195, name: tr)>
tm = <Choice: Turkmenistan (id: 196, name: tm)>
tc = <Choice: Turks and Caicos Islands (id: 197, name: tc)>
tv = <Choice: Tuvalu (id: 198, name: tv)>
ug = <Choice: Uganda (id: 199, name: ug)>
ua = <Choice: Ukraine (id: 200, name: ua)>
ae = <Choice: United Arab Emirates (id: 201, name: ae)>
gb = <Choice: United Kingdom (id: 202, name: gb)>
us = <Choice: United States of America (id: 203, name: us)>
uy = <Choice: Uruguay (id: 204, name: uy)>
uz = <Choice: Uzbekistan (id: 205, name: uz)>
vu = <Choice: Vanuatu (id: 206, name: vu)>
va = <Choice: Vatican City (id: 207, name: va)>
ve = <Choice: Venezuela (id: 208, name: ve)>
vn = <Choice: Viet Nam (id: 209, name: vn)>
vg = <Choice: Virgin Islands British (id: 210, name: vg)>
vi = <Choice: Virgin Islands US (id: 211, name: vi)>
eh = <Choice: Western Sahara (id: 212, name: eh)>
ye = <Choice: Yemen (id: 213, name: ye)>
zm = <Choice: Zambia (id: 214, name: zm)>
zw = <Choice: Zimbabwe (id: 215, name: zw)>
UNITED_KINGDOM = <ChoiceGroup: UNITED_KINGDOM (id: 300)>

Parts of United Kingdom.

england = <Choice: England (id: 301, name: england)>
northern_ireland = <Choice: Northern Ireland (id: 302, name: northern_ireland)>
wales = <Choice: Wales (id: 303, name: wales)>
scotland = <Choice: Scotland (id: 304, name: scotland)>
UNRECOGNIZED_STATES = <ChoiceGroup: UNRECOGNIZED_STATES (id: 600)>

De facto countries that are not globally recognized.

cy_northern = <Choice: Northern Cyprus (id: 601, name: cy_northern)>
palestine = <Choice: Palestine (id: 602, name: palestine)>
somaliland = <Choice: Somaliland (id: 603, name: somaliland)>
UNIONS = <ChoiceGroup: UNIONS (id: 900)>

Commonly referred unions and associations.

african_union = <Choice: African Union (id: 901, name: african_union)>
arab_league = <Choice: Arab League (id: 902, name: arab_league)>
association_of_southeast_asian_nations = <Choice: Association of Southeast Asian Nations (id: 903, name: association_of_southeast_asian_nations)>
caricom = <Choice: Caricom (id: 904, name: caricom)>
commonwealth_of_independent_states = <Choice: Commonwealth of Independent States (id: 905, name: commonwealth_of_independent_states)>
commonwealth_of_nations = <Choice: Commonwealth of Nations (id: 906, name: commonwealth_of_nations)>
european_union = <Choice: European Union (id: 907, name: european_union)>
islamic_conference = <Choice: Islamic Conference (id: 908, name: islamic_conference)>
nato = <Choice: NATO (id: 909, name: nato)>
olimpic_movement = <Choice: Olimpic Movement (id: 910, name: olimpic_movement)>
opec = <Choice: OPEC (id: 911, name: opec)>
red_cross = <Choice: Red Cross (id: 912, name: red_cross)>
united_nations = <Choice: United Nations (id: 913, name: united_nations)>
as = <Choice: American Samoa (id: 4, name: as)>
in = <Choice: India (id: 88, name: in)>
is = <Choice: Iceland (id: 87, name: is)>
class Gender(filter=(<object object at 0x102dabb30>, ), item=<object object at 0x102dabb30>, grouped=False)
female = <Choice: female (id: 1, name: female)>
male = <Choice: male (id: 2, name: male)>
unspecified = <Choice: unspecified (id: 3, name: unspecified)>
class Language(filter=(<object object at 0x102dabb30>, ), item=<object object at 0x102dabb30>, grouped=False)

Specifies a broad set of languages. Uses a superset of values found in Django and Firefox sources.

aa = <Choice: Afar (id: 1, name: aa)>
ab = <Choice: Abkhazian (id: 2, name: ab)>
ae = <Choice: Avestan (id: 3, name: ae)>
af = <Choice: Afrikaans (id: 4, name: af)>
ak = <Choice: Akan (id: 5, name: ak)>
am = <Choice: Amharic (id: 6, name: am)>
an = <Choice: Aragonese (id: 7, name: an)>
ar = <Choice: Arabic (id: 8, name: ar)>
as_ = <Choice: Assamese (id: -255, name: as)>
ast = <Choice: Asturian (id: 10, name: ast)>
av = <Choice: Avaric (id: 11, name: av)>
ay = <Choice: Aymara (id: 12, name: ay)>
az = <Choice: Azerbaijani (id: 13, name: az)>
ba = <Choice: Bashkir (id: 14, name: ba)>
be = <Choice: Belarusian (id: 15, name: be)>
bg = <Choice: Bulgarian (id: 16, name: bg)>
bh = <Choice: Bihari (id: 17, name: bh)>
bi = <Choice: Bislama (id: 18, name: bi)>
bm = <Choice: Bambara (id: 19, name: bm)>
bn = <Choice: Bengali (id: 20, name: bn)>
bo = <Choice: Tibetan (id: 21, name: bo)>
br = <Choice: Breton (id: 22, name: br)>
bs = <Choice: Bosnian (id: 23, name: bs)>
ca = <Choice: Catalan (id: 24, name: ca)>
ce = <Choice: Chechen (id: 25, name: ce)>
ch = <Choice: Chamorro (id: 26, name: ch)>
co = <Choice: Corsican (id: 27, name: co)>
cr = <Choice: Cree (id: 28, name: cr)>
cs = <Choice: Czech (id: 29, name: cs)>
cu = <Choice: Church Slavic (id: 30, name: cu)>
cv = <Choice: Chuvash (id: 31, name: cv)>
cy = <Choice: Welsh (id: 32, name: cy)>
da = <Choice: Danish (id: 33, name: da)>
de = <Choice: German (id: 34, name: de)>
dv = <Choice: Divehi (id: 35, name: dv)>
dz = <Choice: Dzongkha (id: 36, name: dz)>
ee = <Choice: Ewe (id: 37, name: ee)>
el = <Choice: Greek (id: 38, name: el)>
en = <Choice: English (id: 39, name: en)>
en_gb = <Choice: British English (id: 40, name: en_gb)>
en_us = <Choice: American English (id: 41, name: en_us)>
eo = <Choice: Esperanto (id: 42, name: eo)>
es = <Choice: Spanish (id: 43, name: es)>
es_ar = <Choice: Argentinian Spanish (id: 44, name: es_ar)>
et = <Choice: Estonian (id: 45, name: et)>
eu = <Choice: Basque (id: 46, name: eu)>
fa = <Choice: Persian (id: 47, name: fa)>
ff = <Choice: Fulah (id: 48, name: ff)>
fi = <Choice: Finnish (id: 49, name: fi)>
fj = <Choice: Fijian (id: 50, name: fj)>
fo = <Choice: Faroese (id: 51, name: fo)>
fr = <Choice: French (id: 52, name: fr)>
fur = <Choice: Friulian (id: 53, name: fur)>
fy = <Choice: Frisian (id: 54, name: fy)>
ga = <Choice: Irish (id: 55, name: ga)>
gd = <Choice: Scots Gaelic (id: 56, name: gd)>
gl = <Choice: Galician (id: 57, name: gl)>
gn = <Choice: Guarani (id: 58, name: gn)>
gu = <Choice: Gujarati (id: 59, name: gu)>
gv = <Choice: Manx (id: 60, name: gv)>
ha = <Choice: Hausa (id: 61, name: ha)>
he = <Choice: Hebrew (id: 62, name: he)>
hi = <Choice: Hindi (id: 63, name: hi)>
ho = <Choice: Hiri Motu (id: 64, name: ho)>
hr = <Choice: Croatian (id: 65, name: hr)>
hsb = <Choice: Upper Sorbian (id: 66, name: hsb)>
ht = <Choice: Haitian (id: 67, name: ht)>
hu = <Choice: Hungarian (id: 68, name: hu)>
hy = <Choice: Armenian (id: 69, name: hy)>
hz = <Choice: Herero (id: 70, name: hz)>
ia = <Choice: Interlingua (id: 71, name: ia)>
id = <Choice: Indonesian (id: 72, name: id)>
ie = <Choice: Interlingue (id: 73, name: ie)>
ig = <Choice: Igbo (id: 74, name: ig)>
ii = <Choice: Sichuan Yi (id: 75, name: ii)>
ik = <Choice: Inupiaq (id: 76, name: ik)>
io = <Choice: Ido (id: 77, name: io)>
is_ = <Choice: Icelandic (id: -255, name: is)>
it = <Choice: Italian (id: 79, name: it)>
iu = <Choice: Inuktitut (id: 80, name: iu)>
ja = <Choice: Japanese (id: 81, name: ja)>
jv = <Choice: Javanese (id: 82, name: jv)>
ka = <Choice: Georgian (id: 83, name: ka)>
kg = <Choice: Kongo (id: 84, name: kg)>
ki = <Choice: Kikuyu (id: 85, name: ki)>
kj = <Choice: Kuanyama (id: 86, name: kj)>
kk = <Choice: Kazakh (id: 87, name: kk)>
kl = <Choice: Greenlandic (id: 88, name: kl)>
km = <Choice: Khmer (id: 89, name: km)>
kn = <Choice: Kannada (id: 90, name: kn)>
ko = <Choice: Korean (id: 91, name: ko)>
kok = <Choice: Konkani (id: 92, name: kok)>
kr = <Choice: Kanuri (id: 93, name: kr)>
ks = <Choice: Kashmiri (id: 94, name: ks)>
ku = <Choice: Kurdish (id: 95, name: ku)>
kv = <Choice: Komi (id: 96, name: kv)>
kw = <Choice: Cornish (id: 97, name: kw)>
ky = <Choice: Kirghiz (id: 98, name: ky)>
la = <Choice: Latin (id: 99, name: la)>
lb = <Choice: Luxembourgish (id: 100, name: lb)>
lg = <Choice: Ganda (id: 101, name: lg)>
li = <Choice: Limburgan (id: 102, name: li)>
ln = <Choice: Lingala (id: 103, name: ln)>
lo = <Choice: Lao (id: 104, name: lo)>
lt = <Choice: Lithuanian (id: 105, name: lt)>
lu = <Choice: Luba-Katanga (id: 106, name: lu)>
lv = <Choice: Latvian (id: 107, name: lv)>
mg = <Choice: Malagasy (id: 108, name: mg)>
mh = <Choice: Marshallese (id: 109, name: mh)>
mi = <Choice: Maori (id: 110, name: mi)>
mk = <Choice: Macedonian (id: 111, name: mk)>
ml = <Choice: Malayalam (id: 112, name: ml)>
mn = <Choice: Mongolian (id: 113, name: mn)>
mr = <Choice: Marathi (id: 114, name: mr)>
ms = <Choice: Malay (id: 115, name: ms)>
mt = <Choice: Maltese (id: 116, name: mt)>
my = <Choice: Burmese (id: 117, name: my)>
na = <Choice: Nauru (id: 118, name: na)>
nb = <Choice: Norwegian Bokm\xe5l (id: 119, name: nb)>
nd = <Choice: Ndebele, North (id: 120, name: nd)>
ne = <Choice: Nepali (id: 121, name: ne)>
ng = <Choice: Ndonga (id: 122, name: ng)>
nl = <Choice: Dutch (id: 123, name: nl)>
nn = <Choice: Norwegian Nynorsk (id: 124, name: nn)>
no = <Choice: Norwegian (id: 125, name: no)>
nr = <Choice: Ndebele, South (id: 126, name: nr)>
nso = <Choice: Sotho, Northern (id: 127, name: nso)>
nv = <Choice: Navajo (id: 128, name: nv)>
ny = <Choice: Chichewa (id: 129, name: ny)>
oc = <Choice: Occitan (id: 130, name: oc)>
oj = <Choice: Ojibwa (id: 131, name: oj)>
om = <Choice: Oromo (id: 132, name: om)>
or_ = <Choice: Oriya (id: -255, name: or)>
os = <Choice: Ossetian (id: 134, name: os)>
pa = <Choice: Punjabi (id: 135, name: pa)>
pi = <Choice: Pali (id: 136, name: pi)>
pl = <Choice: Polish (id: 137, name: pl)>
ps = <Choice: Pashto (id: 138, name: ps)>
pt = <Choice: Portuguese (id: 139, name: pt)>
pt_br = <Choice: Brazilian Portugese (id: 140, name: pt_br)>
qu = <Choice: Quechua (id: 141, name: qu)>
rm = <Choice: Rhaeto-Romanic (id: 142, name: rm)>
rn = <Choice: Kirundi (id: 143, name: rn)>
ro = <Choice: Romanian (id: 144, name: ro)>
ru = <Choice: Russian (id: 145, name: ru)>
rw = <Choice: Kinyarwanda (id: 146, name: rw)>
sa = <Choice: Sanskrit (id: 147, name: sa)>
sc = <Choice: Sardinian (id: 148, name: sc)>
sd = <Choice: Sindhi (id: 149, name: sd)>
se = <Choice: Northern Sami (id: 150, name: se)>
sg = <Choice: Sango (id: 151, name: sg)>
si = <Choice: Singhalese (id: 152, name: si)>
sk = <Choice: Slovak (id: 153, name: sk)>
sl = <Choice: Slovenian (id: 154, name: sl)>
sm = <Choice: Samoan (id: 155, name: sm)>
sn = <Choice: Shona (id: 156, name: sn)>
so = <Choice: Somali (id: 157, name: so)>
sq = <Choice: Albanian (id: 158, name: sq)>
sr = <Choice: Serbian (id: 159, name: sr)>
sr_latn = <Choice: Serbian Latin (id: 160, name: sr_latn)>
ss = <Choice: Siswati (id: 161, name: ss)>
st = <Choice: Sotho, Southern (id: 162, name: st)>
su = <Choice: Sundanese (id: 163, name: su)>
sv = <Choice: Swedish (id: 164, name: sv)>
sw = <Choice: Swahili (id: 165, name: sw)>
ta = <Choice: Tamil (id: 166, name: ta)>
te = <Choice: Telugu (id: 167, name: te)>
tg = <Choice: Tajik (id: 168, name: tg)>
th = <Choice: Thai (id: 169, name: th)>
ti = <Choice: Tigrinya (id: 170, name: ti)>
tig = <Choice: Tigre (id: 171, name: tig)>
tk = <Choice: Turkmen (id: 172, name: tk)>
tl = <Choice: Tagalog (id: 173, name: tl)>
tlh = <Choice: Klingon (id: 174, name: tlh)>
tn = <Choice: Tswana (id: 175, name: tn)>
to = <Choice: Tonga (id: 176, name: to)>
tr = <Choice: Turkish (id: 177, name: tr)>
ts = <Choice: Tsonga (id: 178, name: ts)>
tt = <Choice: Tatar (id: 179, name: tt)>
tw = <Choice: Twi (id: 180, name: tw)>
ty = <Choice: Tahitian (id: 181, name: ty)>
ug = <Choice: Uighur (id: 182, name: ug)>
uk = <Choice: Ukrainian (id: 183, name: uk)>
ur = <Choice: Urdu (id: 184, name: ur)>
uz = <Choice: Uzbek (id: 185, name: uz)>
ve = <Choice: Venda (id: 186, name: ve)>
vi = <Choice: Vietnamese (id: 187, name: vi)>
vo = <Choice: Volap\xfck (id: 188, name: vo)>
wa = <Choice: Walloon (id: 189, name: wa)>
wen = <Choice: Sorbian (id: 190, name: wen)>
wo = <Choice: Wolof (id: 191, name: wo)>
xh = <Choice: Xhosa (id: 192, name: xh)>
yi = <Choice: Yiddish (id: 193, name: yi)>
yo = <Choice: Yoruba (id: 194, name: yo)>
za = <Choice: Zhuang (id: 195, name: za)>
zh = <Choice: Chinese (id: 196, name: zh)>
zh_cn = <Choice: Simplified Chinese (id: 197, name: zh_cn)>
zh_tw = <Choice: Traditional Chinese (id: 198, name: zh_tw)>
zu = <Choice: Zulu (id: 199, name: zu)>
classmethod from_name(name, fallback=unset) → choice object

Given the name, returns the choice object. Unless fallback is set, raises ValueError if name not present. If the given name has - characters, they are converted to _ for lookup purposes. If no language is found, a more generic language lookup is tried (e.g. for "pl-pl" also "pl" will be attempted) before raising ValueError or returning the fallback value.

classmethod id_from_name(name, fallback=unset) → id

Given the name, returns the id. Unless fallback is set, raises ValueError if name not present. If the given name has - characters, they are converted to _ for lookup purposes. If no language is found, a more generic language lookup is tried (e.g. for "pl-pl" also "pl" will be attempted) before raising ValueError or returning the fallback value.

classmethod desc_from_name(name, fallback=unset) → localized description string

Given the name, returns the localized description string. Unless fallback is set, raises ValueError if name not present. If the given name has - characters, they are converted to _ for lookup purposes. If no language is found, a more generic language lookup is tried (e.g. for "pl-pl" also "pl" will be attempted) before raising ValueError or returning the fallback value.

classmethod raw_from_name(name, fallback=unset) → raw description string

Given the name, returns the raw description string. Unless fallback is set, raises ValueError if name not present. If the given name has - characters, they are converted to _ for lookup purposes. If no language is found, a more generic language lookup is tried (e.g. for "pl-pl" also "pl" will be attempted) before raising ValueError or returning the fallback value.

classmethod FromName(name, fallback=<object object at 0x102dabb30>)

Choices.from_name(name, fallback=unset) -> choice object

Given the name, returns the choice object. Unless fallback is set, raises ValueError if name not present. If the given name has - characters, they are converted to _ for lookup purposes. If no language is found, a more generic language lookup is tried (e.g. for "pl-pl" also "pl" will be attempted) before raising ValueError or returning the fallback value.

classmethod IDFromName(name, fallback=<object object at 0x102dabb30>)

Choices.id_from_name(name, fallback=unset) -> id

Given the name, returns the id. Unless fallback is set, raises ValueError if name not present. If the given name has - characters, they are converted to _ for lookup purposes. If no language is found, a more generic language lookup is tried (e.g. for "pl-pl" also "pl" will be attempted) before raising ValueError or returning the fallback value.

classmethod DescFromName(name, fallback=<object object at 0x102dabb30>)

Choices.desc_from_name(name, fallback=unset) -> localized description string

Given the name, returns the localized description string. Unless fallback is set, raises ValueError if name not present. If the given name has - characters, they are converted to _ for lookup purposes. If no language is found, a more generic language lookup is tried (e.g. for "pl-pl" also "pl" will be attempted) before raising ValueError or returning the fallback value.

as = <Choice: Assamese (id: 9, name: as)>
is = <Choice: Icelandic (id: 78, name: is)>
or = <Choice: Oriya (id: 133, name: or)>
classmethod RawFromName(name, fallback=<object object at 0x102dabb30>)

Choices.raw_from_name(name, fallback=unset) -> raw description string

Given the name, returns the raw description string. Unless fallback is set, raises ValueError if name not present. If the given name has - characters, they are converted to _ for lookup purposes. If no language is found, a more generic language lookup is tried (e.g. for "pl-pl" also "pl" will be attempted) before raising ValueError or returning the fallback value.