diff --git a/app/templates/about.html b/app/templates/about.html index 583f490..e291b3c 100644 --- a/app/templates/about.html +++ b/app/templates/about.html @@ -22,5 +22,9 @@
VERSION: {{ tag_name }}
+CREATION DATE: {{ creation_date }}
+PUBLISH DATE: {{ publish_date }}
+RECENT CHANGES: {{ changes }}
{% endblock %} \ No newline at end of file diff --git a/app/views.py b/app/views.py index 485fa15..938fb77 100644 --- a/app/views.py +++ b/app/views.py @@ -97,7 +97,20 @@ def taglinks(request, tagname): def about(request): """about view""" - return render(request, 'about.html', {'title': 'About'}) + response = requests.get("https://api.github.com/repos/Bhupesh-V/tutorialdb/releases/latest") + response_json = response.json() + tag_name = response_json['tag_name'] + created_at = response_json['created_at'] + published_at = response_json['published_at'] + changes = response_json['body'] + context = { + 'title': 'About', + 'tag_name': tag_name, + 'creation_date': created_at, + 'publish_date': published_at, + "changes": changes + } + return render(request, 'about.html', context) class ContributeView(TemplateView):