Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
4d94ff16
authored
Jan 30, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
store api http code
parent
dcd6abfb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
store/views.py
+2
-1
No files found.
store/views.py
View file @
4d94ff16
...
@@ -6,6 +6,7 @@ from store.api import StoreApi
...
@@ -6,6 +6,7 @@ from store.api import StoreApi
from
django.contrib.auth.decorators
import
login_required
from
django.contrib.auth.decorators
import
login_required
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
import
os
import
os
import
json
@login_required
@login_required
def
index
(
request
):
def
index
(
request
):
...
@@ -17,7 +18,7 @@ def index(request):
...
@@ -17,7 +18,7 @@ def index(request):
for
key
in
request
.
user
.
sshkey_set
.
all
():
for
key
in
request
.
user
.
sshkey_set
.
all
():
key_list
.
append
(
key
.
key
)
key_list
.
append
(
key
.
key
)
except
:
except
:
return
HttpResponse
(
'Can not acces to django database!'
)
return
HttpResponse
(
'Can not acces to django database!'
,
status_code
=
404
)
if
StoreApi
.
userexist
(
user
)
!=
True
:
if
StoreApi
.
userexist
(
user
)
!=
True
:
#Create user
#Create user
if
not
StoreApi
.
createuser
(
user
,
password
,
key_list
):
if
not
StoreApi
.
createuser
(
user
,
password
,
key_list
):
...
...
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