-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add Build managers and Update Build Querysets. #5779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
31b9bf2
bd11994
8f3e64b
66200a0
34e4134
3a3cfdf
3d3de29
b55983f
6187272
386ca07
29348ef
11a0583
c100c81
c1c03bb
5ea5f67
73a46a5
56493fa
d8cff7e
84a6975
05951cf
e192300
d5ec837
1f13be1
e0232b3
fdcfcf6
ef13214
736a337
c18f381
908860a
f81bcf0
66377c2
8bdf75c
21f96de
014477d
d3f5254
6bca1e4
8830a18
5ed38c4
2d8b072
89f3c8a
7b63973
3a2fc6d
bca152a
5f90052
120eb5d
ef3d061
5b33bbd
5180743
8301679
7b75ee8
8c7b02b
5d6c750
c5d1c09
7607268
75efef8
51188e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,6 +84,21 @@ def post(self, request, project_slug): | |
|
||
class BuildList(BuildBase, BuildTriggerMixin, ListView): | ||
|
||
def get_queryset(self): | ||
# this is used to include only internal version | ||
# builds in the build list page | ||
self.project_slug = self.kwargs.get('project_slug', None) | ||
self.project = get_object_or_404( | ||
Project.objects.protected(self.request.user), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't used There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ericholscher This is default in the base class should we change this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ericholscher This is default in the base class and we were using it should we change it? |
||
slug=self.project_slug, | ||
) | ||
queryset = Build.internal.public( | ||
user=self.request.user, | ||
project=self.project, | ||
).select_related('project', 'version') | ||
|
||
return queryset | ||
|
||
def get_context_data(self, **kwargs): | ||
context = super().get_context_data(**kwargs) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't change this setting. We need to be able to still override this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ericholscher actually we are now using
BuildManager
notBuildQueryset.as_manager()
so i put this settings in the BuildManager.https://github.com/rtfd/readthedocs.org/blob/3f93788ea69ad90c6230f4e9d19aae43a8428020/readthedocs/builds/managers.py#L176