diff --git a/hello/views.py b/hello/views.py index bd7a34b00..3b94dc29c 100644 --- a/hello/views.py +++ b/hello/views.py @@ -1,3 +1,6 @@ +import requests +import os +from django.http import HttpResponse from django.shortcuts import render from .models import Greeting @@ -6,7 +9,8 @@ def index(request): - return render(request, "index.html") + times = int(os.environ.get('TIMES', 4)) + return HttpResponse('Hello! ' * times) def db(request): diff --git a/requirements.txt b/requirements.txt index c420fa54c..952d83e8b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ django>=5.1,<5.2 gunicorn>=23,<24 dj-database-url>=2,<3 whitenoise[brotli]>=6,<7 +requests # Uncomment these lines to use a Postgres database. Both are needed, since in production # (which uses Linux) we want to install from source, so that security updates from the