@@ -28,11 +28,18 @@ def get(self, request):
28
28
build = version .builds .last ()
29
29
30
30
# TODO: define how it will be the exact JSON object returned here
31
+ # NOTE: we could use the APIv3 serializers for some of these objects if we want to keep consistency.
32
+ # However, those may require some extra db calls that we probably want to avoid.
31
33
data = {
34
+ "comment" : (
35
+ "THIS RESPONSE IS IN ALPHA FOR TEST PURPOSES ONLY"
36
+ " AND IT'S GOING TO CHANGE COMPLETELY -- DO NOT USE IT!"
37
+ ),
32
38
"project" : {
33
39
"slug" : project .slug ,
34
40
"language" : project .language ,
35
41
"repository_url" : project .repo ,
42
+ "programming_language" : project .programming_language ,
36
43
},
37
44
"version" : {
38
45
"slug" : version .slug ,
@@ -44,7 +51,15 @@ def get(self, request):
44
51
"domains" : {
45
52
"dashboard" : settings .PRODUCTION_DOMAIN ,
46
53
},
54
+ "readthedocs" : {
55
+ "analytics" : {
56
+ "code" : settings .GLOBAL_ANALYTICS_CODE ,
57
+ },
58
+ },
47
59
"features" : {
60
+ "analytics" : {
61
+ "code" : project .analytics_code ,
62
+ },
48
63
"external_version_warning" : {
49
64
"enabled" : True ,
50
65
"query_selector" : "[role=main]" ,
@@ -66,7 +81,7 @@ def get(self, request):
66
81
"slug" : version .slug ,
67
82
"url" : f"/{ project .language } /{ version .slug } /" ,
68
83
}
69
- for version in project .versions .filter (active = True )
84
+ for version in project .versions .filter (active = True ). only ( "slug" )
70
85
],
71
86
"downloads" : [],
72
87
# TODO: get this values properly
0 commit comments