Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
2843c67b
Commit
2843c67b
authored
Feb 25, 2015
by
Jean Michel Rouly
Browse files
added a public landing page instead of redirecting the the login page immediately
parent
a25d3dc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
go/go/templates/public_landing.html
0 → 100644
View file @
2843c67b
{% extends 'base.html' %}
{% block title %}
Go - Welcome
{% endblock %}
{% block content %}
<div
class=
"page-header"
id=
"banner"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h1><strong>
Go
</strong></h1>
<p
class=
"lead"
>
University-branded URL shortening.
</p>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h3>
What is Go?
</h3>
<p>
Mason Go is a product of the George Mason University
<a
href=
"http://srct.gmu.edu"
>
Student-Run Computing and Technology
</a>
organization. Go provides University-branded URL shortening for administration,
ULife groups, and student organizations. Access is moderated by SRCT
administrators. Please log in in order to submit an access request.
</p>
<a
href=
"{% url 'go_login' %}"
class=
"btn btn-success"
>
Log In
</a>
</div>
</div>
{% endblock %}
go/go/views.py
View file @
2843c67b
...
@@ -75,7 +75,6 @@ Define user views here.
...
@@ -75,7 +75,6 @@ Define user views here.
"""
"""
@
login_required
def
index
(
request
):
def
index
(
request
):
"""
"""
This view handles the homepage that the user is presented with when
This view handles the homepage that the user is presented with when
...
@@ -85,6 +84,10 @@ def index(request):
...
@@ -85,6 +84,10 @@ def index(request):
get the URL registration form.
get the URL registration form.
"""
"""
# If the user is not authenticated, show them a public landing page.
if
not
request
.
user
.
is_authenticated
():
return
render
(
request
,
'public_landing.html'
)
# If the user isn't registered, don't give them any leeway.
# If the user isn't registered, don't give them any leeway.
if
not
is_approved
(
request
.
user
):
if
not
is_approved
(
request
.
user
):
return
render
(
request
,
'not_registered.html'
)
return
render
(
request
,
'not_registered.html'
)
...
...
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