equal
deleted
inserted
replaced
32 from django import http |
32 from django import http |
33 from django import shortcuts |
33 from django import shortcuts |
34 from django import newforms as forms |
34 from django import newforms as forms |
35 |
35 |
36 from soc.logic import out_of_band |
36 from soc.logic import out_of_band |
37 from soc.logic import feed |
37 from soc.logic import validate |
38 from soc.logic.site import id_user |
38 from soc.logic.site import id_user |
39 from soc.views import simple |
39 from soc.views import simple |
40 from soc.views.helpers import custom_widgets |
40 from soc.views.helpers import custom_widgets |
41 from soc.views.helpers import forms_helpers |
41 from soc.views.helpers import forms_helpers |
42 from soc.views.helpers import response_helpers |
42 from soc.views.helpers import response_helpers |
80 |
80 |
81 if feed_url == '': |
81 if feed_url == '': |
82 # feed url not supplied (which is OK), so do not try to validate it |
82 # feed url not supplied (which is OK), so do not try to validate it |
83 return None |
83 return None |
84 |
84 |
85 if not feed.isFeedURLValid(feed_url): |
85 if not validate.isFeedURLValid(feed_url): |
86 raise forms.ValidationError('This URL is not a valid ATOM or RSS feed.') |
86 raise forms.ValidationError('This URL is not a valid ATOM or RSS feed.') |
87 |
87 |
88 return feed_url |
88 return feed_url |
89 |
89 |
90 |
90 |