~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to docs/ref/contrib/localflavor.txt

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-05-21 07:52:55 UTC
  • mfrom: (1.3.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20100521075255-ii78v1dyfmyu3uzx
Tags: upstream-1.2
Import upstream version 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    * Germany_
51
51
    * Iceland_
52
52
    * India_
 
53
    * Indonesia_
 
54
    * Ireland_
53
55
    * Italy_
54
56
    * Japan_
 
57
    * Kuwait_
55
58
    * Mexico_
56
59
    * `The Netherlands`_
57
60
    * Norway_
58
61
    * Peru_
59
62
    * Poland_
 
63
    * Portugal_
60
64
    * Romania_
61
65
    * Slovakia_
62
66
    * `South Africa`_
63
67
    * Spain_
 
68
    * Sweden_
64
69
    * Switzerland_
65
70
    * `United Kingdom`_
66
71
    * `United States of America`_
 
72
    * Uruguay_
67
73
 
68
74
The ``django.contrib.localflavor`` package also includes a ``generic`` subpackage,
69
75
containing useful code that is not specific to one particular country or culture.
91
97
.. _The Netherlands: `The Netherlands (nl)`_
92
98
.. _Iceland: `Iceland (is\_)`_
93
99
.. _India: `India (in\_)`_
 
100
.. _Indonesia: `Indonesia (id)`_
 
101
.. _Ireland: `Ireland (ie)`_
94
102
.. _Italy: `Italy (it)`_
95
103
.. _Japan: `Japan (jp)`_
 
104
.. _Kuwait: `Kuwait (kw)`_
96
105
.. _Mexico: `Mexico (mx)`_
97
106
.. _Norway: `Norway (no)`_
98
107
.. _Peru: `Peru (pe)`_
99
108
.. _Poland: `Poland (pl)`_
 
109
.. _Portugal: `Portugal (pt)`_
100
110
.. _Romania: `Romania (ro)`_
101
111
.. _Slovakia: `Slovakia (sk)`_
102
112
.. _South Africa: `South Africa (za)`_
103
113
.. _Spain: `Spain (es)`_
 
114
.. _Sweden: `Sweden (se)`_
104
115
.. _Switzerland: `Switzerland (ch)`_
105
116
.. _United Kingdom: `United Kingdom (uk)`_
106
117
.. _United States of America: `United States of America (us)`_
 
118
.. _Uruguay: `Uruguay (uy)`_
107
119
 
108
120
Adding flavors
109
121
==============
166
178
 
167
179
.. class:: at.forms.ATStateSelect
168
180
 
169
 
    A ``Select`` widget that uses a list of Austrian states as its choices. 
 
181
    A ``Select`` widget that uses a list of Austrian states as its choices.
170
182
 
171
183
.. class:: at.forms.ATSocialSecurityNumberField
172
184
 
367
379
    A ``Select`` widget that uses a list of Indian states/territories as its
368
380
    choices.
369
381
 
 
382
Ireland (``ie``)
 
383
================
 
384
 
 
385
.. class:: ie.forms.IECountySelect
 
386
 
 
387
    A ``Select`` widget that uses a list of Irish Counties as its choices.
 
388
 
 
389
Indonesia (``id``)
 
390
==================
 
391
 
 
392
.. class:: id.forms.IDPostCodeField
 
393
 
 
394
    A form field that validates input as an Indonesian post code field.
 
395
 
 
396
.. class:: id.forms.IDProvinceSelect
 
397
 
 
398
    A ``Select`` widget that uses a list of Indonesian provinces as its choices.
 
399
 
 
400
.. class:: id.forms.IDPhoneNumberField
 
401
 
 
402
    A form field that validates input as an Indonesian telephone number.
 
403
 
 
404
.. class:: id.forms.IDLicensePlatePrefixSelect
 
405
 
 
406
    A ``Select`` widget that uses a list of Indonesian license plate
 
407
    prefix code as its choices.
 
408
 
 
409
.. class:: id.forms.IDLicensePlateField
 
410
 
 
411
    A form field that validates input as an Indonesian vehicle license plate.
 
412
 
 
413
.. class:: id.forms.IDNationalIdentityNumberField
 
414
 
 
415
    A form field that validates input as an Indonesian national identity
 
416
    number (`NIK`_/KTP). The output will be in the format of
 
417
    'XX.XXXX.DDMMYY.XXXX'. Dots or spaces can be used in the input to break
 
418
    down the numbers.
 
419
 
 
420
.. _NIK: http://en.wikipedia.org/wiki/Indonesian_identity_card
 
421
 
370
422
Italy (``it``)
371
423
==============
372
424
 
406
458
 
407
459
    A ``Select`` widget that uses a list of Japanese prefectures as its choices.
408
460
 
 
461
Kuwait (``kw``)
 
462
===============
 
463
 
 
464
.. class:: kw.forms.KWCivilIDNumberField
 
465
 
 
466
    A form field that validates input as a Kuwaiti Civil ID number. A valid
 
467
    Civil ID number must obey the following rules:
 
468
 
 
469
    * The number consist of 12 digits.
 
470
    * The birthdate of the person is a valid date.
 
471
    * The calculated checksum equals to the last digit of the Civil ID.
 
472
 
409
473
Mexico (``mx``)
410
474
===============
411
475
 
436
500
Peru (``pe``)
437
501
=============
438
502
 
439
 
.. class:: pt.forms.PEDNIField
 
503
.. class:: pe.forms.PEDNIField
440
504
 
441
505
    A form field that validates input as a DNI (Peruvian national identity)
442
506
    number.
443
507
 
444
 
.. class:: pt.forms.PERUCField
 
508
.. class:: pe.forms.PERUCField
445
509
 
446
510
    A form field that validates input as an RUC (Registro Unico de
447
511
    Contribuyentes) number. Valid RUC numbers have 11 digits.
448
512
 
449
 
.. class:: pt.forms.PEDepartmentSelect
 
513
.. class:: pe.forms.PEDepartmentSelect
450
514
 
451
515
    A ``Select`` widget that uses a list of Peruvian Departments as its choices.
452
516
 
453
517
Poland (``pl``)
454
518
===============
455
519
 
456
 
.. class:: pl.forms.PLNationalIdentificationNumberField
 
520
.. class:: pl.forms.PLPESELField
457
521
 
458
522
    A form field that validates input as a Polish national identification number
459
523
    (PESEL_).
460
524
 
461
525
.. _PESEL: http://en.wikipedia.org/wiki/PESEL
462
526
 
463
 
.. class:: pl.forms.PLNationalBusinessRegisterField
 
527
.. class:: pl.forms.PLREGONField
464
528
 
465
529
    A form field that validates input as a Polish National Official Business
466
530
    Register Number (REGON_), having either seven or nine digits. The checksum
474
538
    A form field that validates input as a Polish postal code. The valid format
475
539
    is XX-XXX, where X is a digit.
476
540
 
477
 
.. class:: pl.forms.PLTaxNumberField
 
541
.. class:: pl.forms.PLNIPField
478
542
 
479
543
    A form field that validates input as a Polish Tax Number (NIP). Valid
480
544
    formats are XXX-XXX-XX-XX or XX-XX-XXX-XXX. The checksum algorithm used
481
545
    for NIPs is documented at http://wipos.p.lodz.pl/zylla/ut/nip-rego.html.
482
546
 
483
 
.. class:: pl.forms.PLAdministrativeUnitSelect
 
547
.. class:: pl.forms.PLCountySelect
484
548
 
485
549
    A ``Select`` widget that uses a list of Polish administrative units as its
486
550
    choices.
487
551
 
488
 
.. class:: pl.forms.PLVoivodeshipSelect
 
552
.. class:: pl.forms.PLProvinceSelect
489
553
 
490
554
    A ``Select`` widget that uses a list of Polish voivodeships (administrative
491
555
    provinces) as its choices.
492
556
 
 
557
Portugal (``pt``)
 
558
=================
 
559
 
 
560
.. class:: pt.forms.PTZipCodeField
 
561
 
 
562
    A form field that validates input as a Portuguese zip code.
 
563
 
 
564
.. class:: pt.forms.PTPhoneNumberField
 
565
 
 
566
    A form field that validates input as a Portuguese phone number.
 
567
    Valid numbers have 9 digits (may include spaces) or start by 00
 
568
    or + (international).
 
569
 
493
570
Romania (``ro``)
494
571
================
495
572
 
516
593
 
517
594
.. class:: ro.forms.ROIBANField
518
595
 
519
 
    A form field that validates its input as a Romanian International Bank 
 
596
    A form field that validates its input as a Romanian International Bank
520
597
    Account Number (IBAN). The valid format is ROXX-XXXX-XXXX-XXXX-XXXX-XXXX,
521
598
    with or without hyphens.
522
599
 
596
673
 
597
674
    A ``Select`` widget that uses a list of Spanish regions as its choices.
598
675
 
 
676
Sweden (``se``)
 
677
===============
 
678
 
 
679
.. class:: se.forms.SECountySelect
 
680
 
 
681
    A Select form widget that uses a list of the Swedish counties (län) as its
 
682
    choices.
 
683
 
 
684
    The cleaned value is the official county code -- see
 
685
    http://en.wikipedia.org/wiki/Counties_of_Sweden for a list.
 
686
 
 
687
.. class:: se.forms.SEOrganisationNumber
 
688
 
 
689
    A form field that validates input as a Swedish organisation number
 
690
    (organisationsnummer).
 
691
 
 
692
    It accepts the same input as SEPersonalIdentityField (for sole
 
693
    proprietorships (enskild firma). However, co-ordination numbers are not
 
694
    accepted.
 
695
 
 
696
    It also accepts ordinary Swedish organisation numbers with the format
 
697
    NNNNNNNNNN.
 
698
 
 
699
    The return value will be YYYYMMDDXXXX for sole proprietors, and NNNNNNNNNN
 
700
    for other organisations.
 
701
 
 
702
.. class:: se.forms.SEPersonalIdentityNumber
 
703
 
 
704
    A form field that validates input as a Swedish personal identity number
 
705
    (personnummer).
 
706
 
 
707
    The correct formats are YYYYMMDD-XXXX, YYYYMMDDXXXX, YYMMDD-XXXX,
 
708
    YYMMDDXXXX and YYMMDD+XXXX.
 
709
 
 
710
    A \+ indicates that the person is older than 100 years, which will be taken
 
711
    into consideration when the date is validated.
 
712
 
 
713
    The checksum will be calculated and checked. The birth date is checked
 
714
    to be a valid date.
 
715
 
 
716
    By default, co-ordination numbers (samordningsnummer) will be accepted. To
 
717
    only allow real personal identity numbers, pass the keyword argument
 
718
    coordination_number=False to the constructor.
 
719
 
 
720
    The cleaned value will always have the format YYYYMMDDXXXX.
 
721
 
 
722
.. class:: se.forms.SEPostalCodeField
 
723
 
 
724
    A form field that validates input as a Swedish postal code (postnummer).
 
725
    Valid codes consist of five digits (XXXXX). The number can optionally be
 
726
    formatted with a space after the third digit (XXX XX).
 
727
 
 
728
    The cleaned value will never contain the space.
 
729
 
599
730
Switzerland (``ch``)
600
731
====================
601
732
 
627
758
 
628
759
    A form field that validates input as a UK postcode. The regular
629
760
    expression used is sourced from the schema for British Standard BS7666
630
 
    address types at http://www.govtalk.gov.uk/gdsc/schemas/bs7666-v2-0.xsd.
 
761
    address types at http://www.cabinetoffice.gov.uk/media/291293/bs7666-v2-0.xml.
631
762
 
632
763
.. class:: uk.forms.UKCountySelect
633
764
 
682
813
 
683
814
    A model field that forms represent as a ``forms.USStateField`` field and
684
815
    stores the two-letter U.S. state abbreviation in the database.
 
816
 
 
817
Uruguay (``uy``)
 
818
================
 
819
 
 
820
.. class:: uy.forms.UYCIField
 
821
 
 
822
    A field that validates Uruguayan 'Cedula de identidad' (CI) numbers.
 
823
 
 
824
.. class:: uy.forms.UYDepartamentSelect
 
825
 
 
826
    A ``Select`` widget that uses a list of  Uruguayan departaments as its
 
827
    choices.