Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e485b237
authored
Feb 21, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: exclude generated public key from list
parent
a34e071a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
one/views.py
+8
-2
No files found.
one/views.py
View file @
e485b237
...
@@ -41,6 +41,12 @@ def home(request):
...
@@ -41,6 +41,12 @@ def home(request):
for
i
,
s
in
enumerate
(
shares
):
for
i
,
s
in
enumerate
(
shares
):
s
.
running_shared
=
s
.
instance_set
.
all
()
.
exclude
(
state
=
"DONE"
)
.
filter
(
owner
=
request
.
user
)
.
count
()
s
.
running_shared
=
s
.
instance_set
.
all
()
.
exclude
(
state
=
"DONE"
)
.
filter
(
owner
=
request
.
user
)
.
count
()
shares
[
i
]
=
s
shares
[
i
]
=
s
try
:
details
=
UserCloudDetails
.
objects
.
get
(
user
=
request
.
user
)
except
UserCloudDetails
.
DoesNotExist
:
details
=
UserCloudDetails
(
user
=
request
.
user
)
details
.
save
()
generated_public_key
=
details
.
ssh_key
return
render_to_response
(
"home.html"
,
RequestContext
(
request
,
{
return
render_to_response
(
"home.html"
,
RequestContext
(
request
,
{
'shares'
:
shares
,
'shares'
:
shares
,
'templates'
:
Template
.
objects
.
filter
(
state
=
'READY'
),
'templates'
:
Template
.
objects
.
filter
(
state
=
'READY'
),
...
@@ -48,8 +54,8 @@ def home(request):
...
@@ -48,8 +54,8 @@ def home(request):
'instances'
:
_list_instances
(
request
),
'instances'
:
_list_instances
(
request
),
'groups'
:
request
.
user
.
person_set
.
all
()[
0
]
.
owned_groups
.
all
(),
'groups'
:
request
.
user
.
person_set
.
all
()[
0
]
.
owned_groups
.
all
(),
'semesters'
:
Semester
.
objects
.
all
(),
'semesters'
:
Semester
.
objects
.
all
(),
'userdetails'
:
UserCloudDetails
.
objects
.
get
(
user
=
request
.
user
)
,
'userdetails'
:
details
,
'keys'
:
request
.
user
.
sshkey_set
.
all
()
'keys'
:
request
.
user
.
sshkey_set
.
exclude
(
id
=
generated_public_key
.
id
)
.
all
()
}))
}))
@login_required
@login_required
...
...
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