diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-11-23 03:44:34 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-11-23 03:44:34 +0100 |
| commit | 4064b6021750d693f905e903378901312a86e6d2 (patch) | |
| tree | 1e09c4c2ec91024c6423495c296e536d0250581a /chimere/forms.py | |
| parent | e38c33b9cf2a890625b781a59e5db354ab1a5485 (diff) | |
| download | Chimère-4064b6021750d693f905e903378901312a86e6d2.tar.bz2 Chimère-4064b6021750d693f905e903378901312a86e6d2.zip | |
OSM export: improve admin form
Diffstat (limited to 'chimere/forms.py')
| -rw-r--r-- | chimere/forms.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chimere/forms.py b/chimere/forms.py index a1e9319..597975d 100644 --- a/chimere/forms.py +++ b/chimere/forms.py @@ -89,6 +89,23 @@ class ContactForm(forms.Form): email = forms.EmailField(label=_("Email (optional)"), required=False) content = forms.CharField(label=_("Object"), widget=forms.Textarea) +class OSMForm(forms.Form): + """ + OSM export form + """ + email = forms.EmailField(label=_("OSM user")) + password = forms.CharField(label=_(u"Password"), + widget=forms.PasswordInput(render_value=False)) + # API URL are hardcoded: the day the API change Chimère will need + # adaptations + api = forms.ChoiceField(label=_(u"API"), + choices=(('', '--'), + ('api06.dev.openstreetmap.org', + _(u"Test API - %s") % 'api06.dev.openstreetmap.org'), + ('api.openstreetmap.org/api', + _(u"Main API - %s") % 'api.openstreetmap.org/api'), + )) + class NewsAdminForm(forms.ModelForm): """ Main form for news |
