Indonesia (id)

Forms

ID-specific Form helpers.

class localflavor.id_.forms.IDLicensePlateField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]

An Indonesian vehicle license plate field.

http://id.wikipedia.org/wiki/Tanda_Nomor_Kendaraan_Bermotor

Plus: “B 12345 12”

class localflavor.id_.forms.IDLicensePlatePrefixSelect(attrs=None)[source]

A Select widget that uses a list of vehicle license plate prefix code of Indonesia as its choices.

http://id.wikipedia.org/wiki/Tanda_Nomor_Kendaraan_Bermotor

class localflavor.id_.forms.IDNationalIdentityNumberField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]

An Indonesian national identity number (NIK/KTP#) field.

http://id.wikipedia.org/wiki/Nomor_Induk_Kependudukan

xx.xxxx.ddmmyy.xxxx - 16 digits (excl. dots)

class localflavor.id_.forms.IDPhoneNumberField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]

An Indonesian telephone number field.

http://id.wikipedia.org/wiki/Daftar_kode_telepon_di_Indonesia

class localflavor.id_.forms.IDPostCodeField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]

An Indonesian post code field.

http://id.wikipedia.org/wiki/Kode_pos

class localflavor.id_.forms.IDProvinceSelect(attrs=None)[source]

A Select widget that uses a list of provinces of Indonesia as its choices.

Data

localflavor.id_.id_choices.PROVINCE_CHOICES = (('ACE', 'Aceh'), ('BLI', 'Bali'), ('BTN', 'Banten'), ('BKL', 'Bengkulu'), ('DIY', 'Yogyakarta'), ('JKT', 'Jakarta'), ('GOR', 'Gorontalo'), ('JMB', 'Jambi'), ('JBR', 'Jawa Barat'), ('JTG', 'Jawa Tengah'), ('JTM', 'Jawa Timur'), ('KBR', 'Kalimantan Barat'), ('KSL', 'Kalimantan Selatan'), ('KTG', 'Kalimantan Tengah'), ('KTM', 'Kalimantan Timur'), ('BBL', 'Kepulauan Bangka-Belitung'), ('KRI', 'Kepulauan Riau'), ('LPG', 'Lampung'), ('MLK', 'Maluku'), ('MUT', 'Maluku Utara'), ('NTB', 'Nusa Tenggara Barat'), ('NTT', 'Nusa Tenggara Timur'), ('PPA', 'Papua'), ('PPB', 'Papua Barat'), ('RIU', 'Riau'), ('SLB', 'Sulawesi Barat'), ('SLS', 'Sulawesi Selatan'), ('SLT', 'Sulawesi Tengah'), ('SLR', 'Sulawesi Tenggara'), ('SLU', 'Sulawesi Utara'), ('SMB', 'Sumatera Barat'), ('SMS', 'Sumatera Selatan'), ('SMU', 'Sumatera Utara'))

Indonesia does not have an official Province code standard. I decided to use unambiguous and consistent (some are common) 3-letter codes. http://id.wikipedia.org/wiki/Daftar_provinsi_Indonesia

localflavor.id_.id_choices.LICENSE_PLATE_PREFIX_CHOICES = (('A', 'Banten'), ('AA', 'Magelang'), ('AB', 'Yogyakarta'), ('AD', 'Surakarta - Solo'), ('AE', 'Madiun'), ('AG', 'Kediri'), ('B', 'Jakarta'), ('BA', 'Sumatera Barat'), ('BB', 'Tapanuli'), ('BD', 'Bengkulu'), ('BE', 'Lampung'), ('BG', 'Sumatera Selatan'), ('BH', 'Jambi'), ('BK', 'Sumatera Utara'), ('BL', 'Nanggroe Aceh Darussalam'), ('BM', 'Riau'), ('BN', 'Kepulauan Bangka Belitung'), ('BP', 'Kepulauan Riau'), ('CC', 'Corps Consulate'), ('CD', 'Corps Diplomatic'), ('D', 'Bandung'), ('DA', 'Kalimantan Selatan'), ('DB', 'Sulawesi Utara Daratan'), ('DC', 'Sulawesi Barat'), ('DD', 'Sulawesi Selatan'), ('DE', 'Maluku'), ('DG', 'Maluku Utara'), ('DH', 'NTT - Timor'), ('DK', 'Bali'), ('DL', 'Sulawesi Utara Kepulauan'), ('DM', 'Gorontalo'), ('DN', 'Sulawesi Tengah'), ('DR', 'NTB - Lombok'), ('DS', 'Papua dan Papua Barat'), ('DT', 'Sulawesi Tenggara'), ('E', 'Cirebon'), ('EA', 'NTB - Sumbawa'), ('EB', 'NTT - Flores'), ('ED', 'NTT - Sumba'), ('F', 'Bogor'), ('G', 'Pekalongan'), ('H', 'Semarang'), ('K', 'Pati'), ('KB', 'Kalimantan Barat'), ('KH', 'Kalimantan Tengah'), ('KT', 'Kalimantan Timur'), ('L', 'Surabaya'), ('M', 'Madura'), ('N', 'Malang'), ('P', 'Jember'), ('R', 'Banyumas'), ('RI', 'Federal Government'), ('S', 'Bojonegoro'), ('T', 'Purwakarta'), ('W', 'Sidoarjo'), ('Z', 'Garut'))

License plate prefixes