Skip to content

Instantly share code, notes, and snippets.

@RoySegall
Last active March 29, 2020 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RoySegall/87104d949e7fdf82dedf14718d939db8 to your computer and use it in GitHub Desktop.
Save RoySegall/87104d949e7fdf82dedf14718d939db8 to your computer and use it in GitHub Desktop.
@url_decoration(re_path=r'^api/blog/(?P<blog_id>\d+)/?$', name="blog")
class BlogControllerForTests(View):
def get(self, request, blog_id):
return JsonResponse({'id': 1, 'title': f'Nice Blog {blog_id}'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment