Skip to content

Instantly share code, notes, and snippets.

@eclecticmiraclecat
Created November 5, 2020 12:33
Show Gist options
  • Select an option

  • Save eclecticmiraclecat/3d8e4688a9308f3807d88374343553ed to your computer and use it in GitHub Desktop.

Select an option

Save eclecticmiraclecat/3d8e4688a9308f3807d88374343553ed to your computer and use it in GitHub Desktop.
# urls.py
from cbvApp.views import GreetingView

urlpatterns = [
    path('', GreetingView.as_view())
]
# views.py
from django.views.generic import View
from django.http import HttpResponse

class GreetingView(View):
  def get(self, request):
    return HttpResponse('hi')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment