Commit 6913a9d0 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

tried to add the login page... now everything is broken, in precisely the way...

tried to add the login page... now everything is broken, in precisely the way things have broken in the past
parent 7ebed047
......@@ -19,6 +19,9 @@ urlpatterns = patterns('trajectories.views',
# homepage
url(r'^$', 'index', name = 'homepage'),
# log in
url(r'^login/$', 'login', name = 'login'),
# about page
url(r'^about/$', 'about', name = 'about'),
......
......@@ -13,7 +13,7 @@
<ul class="nav navbar-nav navbar-right">
<!-- would probably better to have login as a dropdown -->
<!-- username on top of password -->
<li><a href="#login">Log In</a></li>
<li><a href="#">Log In</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
......
{% extends 'layouts/base.html' %}
{% block title %}
GMU Advisor | Login
{% endblock %}
{% block content %}
<div class="page-header" id="banner">
<div class="row">
<div class="col-lg-12 text-center">
<h1><strong>GMU</strong>Advisor</h1>
<p class="lead">Automated academic advising for George Mason.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-lg-offset-3">
<div class="well">
{% if form.errors %}
<div class="row">
<div class="col-md-12">
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Oh snap!</strong> Your username and password were not
found. Please try again.
</div>
</div>
</div>
{% endif %}
<form id="login-form" method="post" class="form-horizontal"
action="{% url 'django.contrib.auth.views.login' %}"> {% csrf_token %}
<fieldset>
<legend>Log In</legend>
<div class="form-group{%if form.errors%} has-error{%endif%}">
<label class="col-lg-2 control-label" for="username">Username</label>
<div class="col-lg-10">
<input type="username" name="username" id="username"
class="form-control" placeholder="Username" />
</div>
</div>
<div class="form-group{%if form.errors%} has-error{%endif%}">
<label class="col-lg-2 control-label" for="password">Password</label>
<div class="col-lg-10">
<input type="password" name="password" id="password"
class="form-control" placeholder="Password" />
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<input type="submit" class="btn btn-primary" value="Sign In" />
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
{% endblock %}
......@@ -116,6 +116,13 @@ def index(request):
},
)
def index(request):
return render(request, 'login.html', {
},
)
# SRCT, how to contribute information
def about(request):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment