Skip to content

Commit dc658e8

Browse files
committed
fix: use the since parameter for detail view
TypeError: Repository.stars_since() got an unexpected keyword argument 'td'
1 parent c265cc3 commit dc658e8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

django_wtf/core/views/detail_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_object(self, queryset=None):
1313
def get_context_data(self, **kwargs):
1414
context = super().get_context_data(**kwargs)
1515
obj = self.get_object()
16-
stars_since_1m = obj.stars_since(td=timedelta(days=30))
16+
stars_since_1m = obj.stars_since(since=timedelta(days=30))
1717
context["stars_increase_monthly_percent"] = stars_since_1m / obj.stars * 100.0
1818
return context
1919

django_wtf/templates/core/repository_detail.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{% extends "core/base.html" %}
22
{% block content %}
33
<div class="flex-col content-center self-center w-full mb-5 lg:mt-5 lg:flex lg:w-7/12">
4-
<div class="flex">
4+
<div class="flex mt-10 mb-10">
55
<div>
6-
<h1 class="mt-6 text-6xl hover:brightness-125">
7-
<a href="{{ object.github_url }}">{{ object.full_name }}</a>
8-
</h1>
9-
<h3 class="mt-3 text-xl">{{ object.description }}</h3>
6+
<a class="mt-6 text-4xl link link-hover" href="{{ object.github_url }}">{{ object.full_name }}</a>
7+
<p class="mt-3 text-xl">{{ object.description }}</p>
108
<div class="my-3">
119
{% for topic in object.topics %}<div class="ml-1 badge badge-outline">{{ topic }}</div>{% endfor %}
1210
</div>

0 commit comments

Comments
 (0)