Skip to content

Instantly share code, notes, and snippets.

@patrys
Created December 20, 2016 19:03
Show Gist options
  • Save patrys/d8277cdf1ff4ddee3a445f678fe466ef to your computer and use it in GitHub Desktop.
Save patrys/d8277cdf1ff4ddee3a445f678fe466ef 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(http_method_not_allowed=get)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment