File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ class DownloadSerializer(serializers.ModelSerializer):
5
5
property = serializers .SerializerMethodField ()
6
6
7
7
def get_property (self , component ):
8
- return component .downloads
8
+ return component .forks
9
9
10
10
class Meta :
11
11
model = Component
Original file line number Diff line number Diff line change 6
6
import urllib , json
7
7
8
8
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 ]
10
10
top_starred_components = Component .objects .all ().order_by ('-stars' )[:3 ]
11
11
recent_components = Component .objects .all ().order_by ('-modified_time' )[:3 ]
12
12
dl = DownloadSerializer (top_dl_components , many = True ) # serialized data containing number of downloads
You can’t perform that action at this time.
0 commit comments