X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5d9c33d00933597e218b732e3bd0bcbb55c4f371..35c2cc82e299b9ed2c427d8ee7ae072deddcef6d:/src/cover/forms.py?ds=inline diff --git a/src/cover/forms.py b/src/cover/forms.py index 3be4e211..ee82a5af 100644 --- a/src/cover/forms.py +++ b/src/cover/forms.py @@ -50,6 +50,11 @@ class ImageAddForm(forms.ModelForm): % {'url': same_source.first().get_absolute_url()})) return source_url + clean_cut_top = lambda self: self.cleaned_data.get('cut_top') or 0 + clean_cut_bottom = lambda self: self.cleaned_data.get('cut_bottom') or 0 + clean_cut_left = lambda self: self.cleaned_data.get('cut_left') or 0 + clean_cut_right = lambda self: self.cleaned_data.get('cut_right') or 0 + def clean(self): cleaned_data = super(ImageAddForm, self).clean() download_url = cleaned_data.get('download_url', None) @@ -97,7 +102,7 @@ class ReadonlyImageEditForm(ImageEditForm): class ImportForm(forms.Form): - source_url = forms.URLField(label=_('WikiCommons, MNW or Flickr URL')) + source_url = forms.URLField(label=_('WikiCommons, MNW, Flickr, RawPixel URL')) def clean_source_url(self): url = self.cleaned_data['source_url']