Kaydet (Commit) 51c7dadc authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

Fixed #3847 -- Added Finnish localflavor contribution from Ville Säävuori.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4867 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 6a643b03
......@@ -184,6 +184,7 @@ answer newbie questions, and generally made Django that much better:
Radek Švarz <http://www.svarz.cz/translate/>
Swaroop C H <http://www.swaroopch.info>
Aaron Swartz <http://www.aaronsw.com/>
Ville Säävuori <http://www.unessa.net/>
Tyson Tate <tyson@fallingbullets.com>
Tom Tobin
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
......
This diff is collapsed.
"""
FI-specific Form helpers
"""
from django.newforms import ValidationError
from django.newforms.fields import RegexField, Select
from django.utils.translation import gettext
class FIZipCodeField(RegexField):
def __init__(self, *args, **kwargs):
super(FIZipCodeField, self).__init__(r'^\d{5}$',
max_length=None, min_length=None,
error_message=gettext(u'Enter a zip code in the format XXXXX.'),
*args, **kwargs)
class FIMunicipalitySelect(Select):
"""
A Select widget that uses a list of Finnish municipalities as its choices.
"""
def __init__(self, attrs=None):
from fi_municipalities import MUNICIPALITY_CHOICES # relative import
super(FIMunicipalitySelect, self).__init__(attrs, choices=MUNICIPALITY_CHOICES)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment