Skip to content

Commit e731e3b

Browse files
authored
Merge pull request #13 from biojs/develop
Set downloads as forks
2 parents ac8d46e + 80f6292 commit e731e3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class DownloadSerializer(serializers.ModelSerializer):
55
property = serializers.SerializerMethodField()
66

77
def get_property(self, component):
8-
return component.downloads
8+
return component.forks
99

1010
class Meta:
1111
model = Component

main/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import urllib, json
77

88
def index(request):
9-
top_dl_components = Component.objects.all().order_by('-downloads')[:3]
9+
top_dl_components = Component.objects.all().order_by('-forks')[:3]
1010
top_starred_components = Component.objects.all().order_by('-stars')[:3]
1111
recent_components = Component.objects.all().order_by('-modified_time')[:3]
1212
dl = DownloadSerializer(top_dl_components, many=True) # serialized data containing number of downloads

0 commit comments

Comments
 (0)