-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1040ad
commit 38bd13e
Showing
7 changed files
with
58 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ | |
|
||
#myapps | ||
'learning_logs', | ||
'users', | ||
] | ||
|
||
MIDDLEWARE = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
</head> | ||
<body> | ||
|
||
</body> | ||
</html> | ||
{% extends 'learning_logs/base.html' %} | ||
|
||
{% block content %} | ||
<p><a href="{% url 'learning_logs:topic' topic.id %}">{{ topic }}</a></p> | ||
|
||
<p>Edit entry:</p> | ||
|
||
<form action="{% url 'learning_logs:edit_entry' entry.id %}" method="post"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit">save changes</button> | ||
</form> | ||
|
||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends "learning_logs/base.html" %} | ||
|
||
{% block content %} | ||
|
||
{% if form.errors %} | ||
<p>Your username and password didnt match.Please try again</p> | ||
{% endif %} | ||
|
||
<form method="post" action="{% url 'users:login' %}"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit">log in</button> | ||
|
||
<input type="hidden" name="next" value="{% url 'learning_logs:index' %}"/> | ||
</form> | ||
|
||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Defines url patterns for users""" | ||
|
||
from django.conf.urls import url | ||
from django.contrib.auth.views import login | ||
|
||
from . import views | ||
|
||
urlpatterns = [ | ||
#login page | ||
url(r'^login/$', login, {'template_name': 'users/login.html'}, | ||
name='login'), | ||
url(r'^logout/$', views.logout_view, name='logout'), | ||
] |