MCPcopy
hub / github.com/liangliangyy/DjangoBlog / get

Method get

comments/views.py:24–28  ·  view source on GitHub ↗
(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

22 template_name = 'blog/article_detail.html'
23
24 def get(self, request, *args, **kwargs):
25 article_id = self.kwargs['article_id']
26 article = get_object_or_404(Article, pk=article_id)
27 url = article.get_absolute_url()
28 return HttpResponseRedirect(url + "#comments")
29
30 def form_invalid(self, form):
31 article_id = self.kwargs['article_id']

Callers 4

test_validate_commentMethod · 0.45
form_validMethod · 0.45

Calls 1

get_absolute_urlMethod · 0.45