Last active
March 12, 2019 21:28
-
-
Save jayhale/dee47d8b285fae2e813256fa99e9f104 to your computer and use it in GitHub Desktop.
Django on Zeit Now: now-django-example/example_app/views.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# now-django-example/example_app/views.py | |
from datetime import datetime | |
from django.http import HttpResponse | |
def index(request): | |
now = datetime.now() | |
html = f''' | |
<html> | |
<body> | |
<h1>Hello from Zeit Now!</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