Skip to content

Instantly share code, notes, and snippets.

@aliceridgway
Created June 26, 2022 11:07
Embed
What would you like to do?
post detail
def post_detail(request: HttpRequest, slug: str) -> HttpResponse:
post = get_object_or_404(Post, slug=slug)
context = {"post": post}
return render(request, "post_detail.html", context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment