Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
Commit
d83dfd19
authored
Mar 01, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: redirect / to home if logged in
parent
2a3d77a2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletions
+8
-1
cloud/templates/info.html
+0
-0
cloud/urls.py
+1
-0
one/views.py
+7
-1
No files found.
one/templates/index
.html
→
cloud/templates/info
.html
View file @
d83dfd19
File moved
cloud/urls.py
View file @
d83dfd19
...
@@ -20,6 +20,7 @@ urlpatterns = patterns('',
...
@@ -20,6 +20,7 @@ urlpatterns = patterns('',
url
(
r'^logout/$'
,
'school.views.logout'
,
name
=
'logout'
,
),
url
(
r'^logout/$'
,
'school.views.logout'
,
name
=
'logout'
,
),
url
(
r'^$'
,
'one.views.index'
,
),
url
(
r'^$'
,
'one.views.index'
,
),
url
(
r'^info/$'
,
'one.views.info'
,
),
url
(
r'^home/$'
,
'one.views.home'
,
),
url
(
r'^home/$'
,
'one.views.home'
,
),
url
(
r'^vm/new/(?P<template>\d+)/$'
,
'one.views.vm_new'
,
),
url
(
r'^vm/new/(?P<template>\d+)/$'
,
'one.views.vm_new'
,
),
url
(
r'^ajax/vm/new/(?P<template>\d+)/$'
,
'one.views.vm_new_ajax'
,
),
url
(
r'^ajax/vm/new/(?P<template>\d+)/$'
,
'one.views.vm_new_ajax'
,
),
...
...
one/views.py
View file @
d83dfd19
...
@@ -36,8 +36,14 @@ def _list_instances(request):
...
@@ -36,8 +36,14 @@ def _list_instances(request):
instances
=
instances
.
exclude
(
state
=
'DONE'
)
instances
=
instances
.
exclude
(
state
=
'DONE'
)
return
instances
return
instances
def
info
(
request
):
return
render_to_response
(
"info.html"
,
RequestContext
(
request
,
{}))
def
index
(
request
):
def
index
(
request
):
return
render_to_response
(
"index.html"
,
RequestContext
(
request
,
{}))
if
request
.
user
.
is_authenticated
():
return
redirect
(
home
)
else
:
return
redirect
(
info
)
@require_GET
@require_GET
...
...
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