Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e52cd2ff
authored
Aug 30, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: select related for template list
parent
b718f6ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
circle/dashboard/views.py
+4
-3
No files found.
circle/dashboard/views.py
View file @
e52cd2ff
...
@@ -1726,14 +1726,15 @@ class TemplateList(LoginRequiredMixin, FilterMixin, SingleTableView):
...
@@ -1726,14 +1726,15 @@ class TemplateList(LoginRequiredMixin, FilterMixin, SingleTableView):
def
get_queryset
(
self
):
def
get_queryset
(
self
):
logger
.
debug
(
'TemplateList.get_queryset() called. User:
%
s'
,
logger
.
debug
(
'TemplateList.get_queryset() called. User:
%
s'
,
unicode
(
self
.
request
.
user
))
unicode
(
self
.
request
.
user
))
q
ueryset
=
self
.
create_acl_queryset
(
InstanceTemplate
)
q
s
=
self
.
create_acl_queryset
(
InstanceTemplate
)
self
.
create_fake_get
()
self
.
create_fake_get
()
try
:
try
:
return
queryset
.
filter
(
**
self
.
get_queryset_filters
())
.
distinct
()
qs
=
qs
.
filter
(
**
self
.
get_queryset_filters
())
.
distinct
()
except
ValueError
:
except
ValueError
:
messages
.
error
(
self
.
request
,
_
(
"Error during filtering."
))
messages
.
error
(
self
.
request
,
_
(
"Error during filtering."
))
return
queryset
return
qs
.
select_related
(
"lease"
,
"owner"
,
"owner__profile"
)
class
TemplateDelete
(
LoginRequiredMixin
,
DeleteView
):
class
TemplateDelete
(
LoginRequiredMixin
,
DeleteView
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment