From: Radek Czajka Date: Mon, 2 Jul 2012 11:39:39 +0000 (+0200) Subject: fix flickr url regex X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/6422710d756f21201737623ee51d61431cd4e0c9?hp=f56133b11cb6af69972b062012890057ee9f3ea7 fix flickr url regex --- diff --git a/apps/cover/forms.py b/apps/cover/forms.py index fab0bb62..fdd43048 100755 --- a/apps/cover/forms.py +++ b/apps/cover/forms.py @@ -38,7 +38,7 @@ class FlickrForm(forms.Form): def clean_source_url(self): url = self.cleaned_data['source_url'] - m = re.match(r'(https?://)?(www.)?flickr.com/photos/(?P[^/]+)/(?P\d+)', url) + m = re.match(r'(https?://)?(www\.|secure\.)?flickr\.com/photos/(?P[^/]+)/(?P\d+)', url) if not m: raise forms.ValidationError("It doesn't look like Flickr URL.") author_slug, img_id = m.group('author'), m.group('img') diff --git a/apps/cover/templates/cover/flickr.html b/apps/cover/templates/cover/flickr.html deleted file mode 100644 index fcff1c5c..00000000 --- a/apps/cover/templates/cover/flickr.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "catalogue/base.html" %} - - -{% block content %} -

Flickr

- -
-{% csrf_token %} -URL: - -
- - -{% endblock %}