Skip to content

Instantly share code, notes, and snippets.

@patrys
Created December 20, 2016 19:04
Show Gist options
  • Save patrys/cd18b2f4be8b9e544b5313d8bd24b92e to your computer and use it in GitHub Desktop.
Save patrys/cd18b2f4be8b9e544b5313d8bd24b92e to your computer and use it in GitHub Desktop.
from django.views.generic import View
from django.template.response import TemplateResponse
def get(request):
return TemplateResponse(request, 'index.html')
my_class_based_view = View.as_view(dispatch=get)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment