Implement login/logout/edit in profiles app

This commit is contained in:
Trever Fischer
2012-02-19 17:47:51 -05:00
parent ecf02a7ac7
commit 629823dd0d
6 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<form method="POST" action="{% url profiles.views.login %}">
{% csrf_token %}
{{login_form.as_p}}
<input type="submit" value="Login"/>
</form>

View File

@@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<form method="POST" action="{%url profiles.views.edit %}">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit"/>
</form>
{% endblock %}

View File

@@ -0,0 +1,4 @@
{% extends 'base.html' %}
{% block content %}
{% include 'profiles/_login_form.html' %}
{% endblock %}

View File

@@ -3,4 +3,6 @@
{%block content %}
<p>Welcome, {{ user.username }}</p>
<a href="{%url profiles.views.edit %}">Edit profile</a>
{%endblock%}