Replaced own country selection with django-countries package.
This commit is contained in:
@@ -3,11 +3,11 @@ import calendar
|
||||
import datetime
|
||||
import logging
|
||||
from babel.dates import format_date
|
||||
|
||||
from django import forms
|
||||
from django.contrib.auth import forms as auth_forms, password_validation
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.utils.translation import get_language, ugettext, ugettext_lazy as _
|
||||
from django_countries.fields import LazyTypedChoiceField
|
||||
from datetimewidget.widgets import DateWidget, TimeWidget, DateTimeWidget
|
||||
|
||||
from . import choices
|
||||
@@ -318,10 +318,9 @@ class LocationForm(EventCreateForm):
|
||||
_form_title = _(u'Ort')
|
||||
_next_form_name = 'ApproachForm'
|
||||
|
||||
country = forms.ChoiceField(choices=choices.COUNTRY_CHOICES,
|
||||
initial='DE',
|
||||
label=_(u'Land'),
|
||||
)
|
||||
country = LazyTypedChoiceField(choices=choices.COUNTRY_CHOICES,
|
||||
initial='DE',
|
||||
label=_(u'Land'))
|
||||
|
||||
terrain = forms.ChoiceField(choices=choices.TERRAIN_CHOICES,
|
||||
initial='submountains',
|
||||
|
||||
Reference in New Issue
Block a user