From bd95993653a1b94d07316e24a0f519d00f9359d6 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Tue, 4 Dec 2012 16:21:32 -0500 Subject: User can login and logout --- templates/accounts/profile.html | 9 +++++++++ templates/index.html | 5 +++++ templates/registration/logged_out.html | 6 ++++++ templates/registration/login.html | 27 +++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 templates/accounts/profile.html create mode 100644 templates/registration/logged_out.html create mode 100644 templates/registration/login.html (limited to 'templates') diff --git a/templates/accounts/profile.html b/templates/accounts/profile.html new file mode 100644 index 0000000..aa6f3ad --- /dev/null +++ b/templates/accounts/profile.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block content %} +

Your Account

+

Hello {{ user.email }}

+ +{% endblock %} diff --git a/templates/index.html b/templates/index.html index ff76c3e..1e497a5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,6 +6,11 @@

Hello Codemash

You've just created your first Django page. Pretty cool, eh?

{% endblock %} diff --git a/templates/registration/logged_out.html b/templates/registration/logged_out.html new file mode 100644 index 0000000..b6908d4 --- /dev/null +++ b/templates/registration/logged_out.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block content %} +

You are logged out

+

You can go home.

+{% endblock %} diff --git a/templates/registration/login.html b/templates/registration/login.html new file mode 100644 index 0000000..37893a9 --- /dev/null +++ b/templates/registration/login.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} + +{% block content %} + +{% if form.errors %} +

Your username and password didn't match. Please try again.

+{% endif %} + +

Login

+
+ {% csrf_token %} + + + + + + + + + +
{{ form.username.label_tag }}{{ form.username }}
{{ form.password.label_tag }}{{ form.password }}
+ + + +
+ +{% endblock %} -- cgit v1.2.3