Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mymusiclist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Brian Guadalupe
mymusiclist
Commits
c46efa41
Commit
c46efa41
authored
Oct 28, 2017
by
Brian Guadalupe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide login and sigup forms when user is authenticated
parent
379d0bf9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
16 deletions
+23
-16
login.html
templates/login.html
+10
-8
signup.html
templates/signup.html
+13
-8
No files found.
templates/login.html
View file @
c46efa41
...
...
@@ -4,15 +4,17 @@
{% block content %}
<div
class=
"boxified main login_form"
>
<h2>
Login
</h2>
<div
class=
"boxified main login_form"
>
{% if user.is_authenticated %}
<p>
You are already logged in as {{user.username}}. You need to log out before logging in as a different user.
</p>
<p><a
href=
"/logout"
>
Log out
</a>
or
<a
href=
"/"
>
return to home page
</a>
.
</p>
{% else %}
<h2>
Login
</h2>
<form
method=
"post"
>
{% csrf_token %}
{{ form.as_p }}
<button
type=
"submit"
class=
"buttoned"
>
Login
</button>
</form>
</div>
</div>
{% endif %}
{% endblock %}
templates/signup.html
View file @
c46efa41
...
...
@@ -2,15 +2,20 @@
{% block content %}
<div
class=
'boxified main signup_form'
>
<div
class=
'boxified main signup_form'
>
{% if user.is_authenticated %}
<p>
You are already logged in as {{user.username}}.
</p>
<p><a
href=
"/logout"
>
Log out
</a>
or
<a
href=
"/"
>
return to home page
</a>
.
</p>
{% else %}
<h2>
Create your account
</h2>
<p>
Sign up now to start building your music collection with us.
<br/>
Already have an account? Login
Sign up now to start building your music collection with us.
<br/>
Already have an account?
<a
href=
"/login"
>
Log in
</a>
</p>
<form
method=
"post"
>
{% csrf_token %}
{{ form.as_p }}
<button
type=
"submit"
class=
"buttoned"
>
Sign up
</button>
</form>
</div>
{% endif %}
</div>
{% endblock %}
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