summaryrefslogtreecommitdiff
path: root/chimere/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/forms.py')
-rw-r--r--chimere/forms.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/chimere/forms.py b/chimere/forms.py
index 1af454b..1178c81 100644
--- a/chimere/forms.py
+++ b/chimere/forms.py
@@ -204,7 +204,6 @@ class NewsAdminForm(forms.ModelForm):
class ImporterAdminForm(forms.ModelForm):
- filtr = forms.CharField(widget=ImportFiltrWidget, required=False)
importer_type = forms.ChoiceField(
widget=ImporterChoicesWidget,
choices=[('', '--')] + list(IMPORTER_CHOICES))
@@ -224,16 +223,6 @@ class ImporterAdminForm(forms.ModelForm):
Verify that only one type of source is provided
Verify that shapefiles are zipped
"""
- if self.cleaned_data.get('importer_type') == 'OSM' and \
- not self.cleaned_data.get('filtr'):
- raise forms.ValidationError(
- _("For OSM import you must be provide a filter. Select an "
- "area and node/way filter."))
- if self.cleaned_data.get('importer_type') == 'OSM' and \
- not RE_XAPI.match(self.cleaned_data.get('filtr')):
- raise forms.ValidationError(
- _("For OSM import you must be provide a filter. Select an "
- "area and node/way filter."))
if self.cleaned_data.get('importer_type') == 'SHP' and \
not self.cleaned_data.get('zipped'):
raise forms.ValidationError(_("Shapefiles must be provided in a "
@@ -244,8 +233,7 @@ class ImporterAdminForm(forms.ModelForm):
raise forms.ValidationError(_("You have to set \"source\" or "
"\"source file\" but not both."))
if not self.cleaned_data.get('source') and \
- not self.cleaned_data.get('source_file') and \
- self.cleaned_data.get('importer_type') != 'OSM':
+ not self.cleaned_data.get('source_file'):
raise forms.ValidationError(_("You have to set \"source\" or "
"\"source file\"."))
return self.cleaned_data