Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ <h1 class="title">About</h1>
</ul>
</div>
</div>
<p>VERSION: {{ tag_name }}</p>
<p>CREATION DATE: {{ creation_date }}</p>
<p>PUBLISH DATE: {{ publish_date }}</p>
<p>RECENT CHANGES: {{ changes }}</p>
</section>
{% endblock %}
15 changes: 14 additions & 1 deletion app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down