Skip to content

Instantly share code, notes, and snippets.

@jayhale
Created April 22, 2021 12:38
Show Gist options
  • Save jayhale/2ddff002d8c14256d19d7bd8193db9eb to your computer and use it in GitHub Desktop.
Save jayhale/2ddff002d8c14256d19d7bd8193db9eb to your computer and use it in GitHub Desktop.
# vercel-django-example/example/views.py
# https://github.com/jayhale/vercel-django-example/blob/main/example/views.py#L6
from datetime import datetime
from django.http import HttpResponse
def index(request):
now = datetime.now()
html = f'''
<html>
<body>
<h1>Hello from Vercel!</h1>
<p>The current time is { now }.</p>
</body>
</html>
'''
return HttpResponse(html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment