Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
d0abde5e
authored
Feb 12, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: error message for nonunique template creation
parent
b75f7687
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
one/views.py
+8
-3
No files found.
one/views.py
View file @
d0abde5e
...
...
@@ -257,10 +257,15 @@ def vm_new(request, template=None, share=None, redir=True):
share
=
get_object_or_404
(
Share
,
pk
=
share
)
base
=
share
.
template
go
=
True
if
"name"
in
request
.
POST
:
base
=
_template_for_save
(
base
,
request
)
extra
=
"<RECONTEXT>YES</RECONTEXT>"
go
=
_check_quota
(
request
,
base
,
share
)
try
:
base
=
_template_for_save
(
base
,
request
)
extra
=
"<RECONTEXT>YES</RECONTEXT>"
except
:
messages
.
error
(
request
,
_
(
'Can not create template.'
))
go
=
False
go
=
go
and
_check_quota
(
request
,
base
,
share
)
if
not
share
and
not
base
.
public
and
base
.
owner
!=
request
.
user
:
messages
.
error
(
request
,
_
(
'You have no permission to try this instance without a share. Launch a new instance through a share.'
))
...
...
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