Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Small formatting changes to localflavor/is_/forms.py

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5095 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit af6ed6c91ded72d7b35f7120f3581fd8100d308b 1 parent bf89e4b
Adrian Holovaty authored April 26, 2007

Showing 1 changed file with 1 addition and 5 deletions. Show diff stats Hide diff stats

  1. 6  django/contrib/localflavor/is_/forms.py
6  django/contrib/localflavor/is_/forms.py
... ...
@@ -1,12 +1,12 @@
1 1
 """
2 2
 Iceland specific form helpers.
3 3
 """
  4
+
4 5
 from django.newforms import ValidationError
5 6
 from django.newforms.fields import RegexField, EMPTY_VALUES
6 7
 from django.newforms.widgets import Select
7 8
 from django.utils.translation import gettext
8 9
 
9  
-
10 10
 class ISIdNumberField(RegexField):
11 11
     """
12 12
     Icelandic identification number (kennitala). This is a number every citizen
@@ -15,7 +15,6 @@ class ISIdNumberField(RegexField):
15 15
     def __init__(self, *args, **kwargs):
16 16
         error_msg = gettext(u'Enter a valid Icelandic identification number. The format is XXXXXX-XXXX.')
17 17
         kwargs['min_length'],kwargs['max_length'] = 10,11
18  
-
19 18
         super(ISIdNumberField, self).__init__(r'^\d{6}(-| )?\d{4}$', error_message=error_msg, *args, **kwargs)
20 19
 
21 20
     def clean(self, value):
@@ -30,7 +29,6 @@ def clean(self, value):
30 29
         else:
31 30
             raise ValidationError(gettext(u'The Icelandic identification number is not valid.'))
32 31
 
33  
-
34 32
     def _canonify(self, value):
35 33
         """
36 34
         Returns the value as only digits.
@@ -52,7 +50,6 @@ def _format(self, value):
52 50
         """
53 51
         return value[:6]+'-'+value[6:]
54 52
 
55  
-
56 53
 class ISPhoneNumberField(RegexField):
57 54
     """
58 55
     Icelandic phone number. Seven digits with an optional hyphen or space after
@@ -70,7 +67,6 @@ def clean(self, value):
70 67
 
71 68
         return value.replace('-', '').replace(' ', '')
72 69
 
73  
-
74 70
 class ISPostalCodeSelect(Select):
75 71
     """
76 72
     A Select widget that uses a list of Icelandic postal codes as its choices.

0 notes on commit af6ed6c

Please sign in to comment.
Something went wrong with that request. Please try again.