(self, **kwargs)
| 258 | return PUBLIC_ADD_VIEW or self.request.user.is_authenticated |
| 259 | |
| 260 | def get_context_data(self, **kwargs): |
| 261 | return { |
| 262 | **super().get_context_data(**kwargs), |
| 263 | 'title': "Add URLs", |
| 264 | # We can't just call request.build_absolute_uri in the template, because it would include query parameters |
| 265 | 'absolute_add_path': self.request.build_absolute_uri(self.request.path), |
| 266 | 'VERSION': VERSION, |
| 267 | 'FOOTER_INFO': FOOTER_INFO, |
| 268 | 'stdout': '', |
| 269 | } |
| 270 | |
| 271 | def form_valid(self, form): |
| 272 | url = form.cleaned_data["url"] |
no outgoing calls
no test coverage detected