From d459b5f923de44dc7ac636823a9560fabd7332c9 Mon Sep 17 00:00:00 2001 From: Akshay Dahiya Date: Tue, 9 Oct 2018 12:00:31 +0530 Subject: [PATCH 1/2] Add docstrings to views, remove redundant comments --- hello/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hello/views.py b/hello/views.py index 6669713..5cbd062 100644 --- a/hello/views.py +++ b/hello/views.py @@ -6,8 +6,6 @@ from hello.forms import LogMessageForm from hello.models import LogMessage -# def home(request): -# return render(request, 'hello/home.html') class HomeListView(ListView): """Renders the home page, with a list of all polls.""" @@ -19,12 +17,18 @@ def get_context_data(self, **kwargs): return context def about(request): + """Renders the about page.""" return render(request, "hello/about.html") def contact(request): + """Renders the contact page.""" return render(request, "hello/contact.html") def hello_there(request, name): + """Renders the hello_there page. + Args: + name: Name to say hello to + """ return render( request, "hello/hello_there.html", {"name": name, "date": datetime.now()} ) From bcb8f5f248e4e76ae0a9d0984d635ca7462267c3 Mon Sep 17 00:00:00 2001 From: Akshay Dahiya Date: Tue, 9 Oct 2018 12:01:19 +0530 Subject: [PATCH 2/2] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ef52540..9d1d8bf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -Django==2.1.1 +Django==2.1.2 pytz==2018.5