From 32b5eafe671be71f6b9ac3a3132c2329741d1e93 Mon Sep 17 00:00:00 2001 From: Isaac Bythewood Date: Sun, 3 Mar 2013 21:19:07 +0000 Subject: [PATCH] Fix template locations to match app name --- pinry/templates/user/login.html | 22 ---------------------- pinry/templates/user/private.html | 15 --------------- pinry/templates/user/register.html | 22 ---------------------- pinry/templates/users/login.html | 22 ++++++++++++++++++++++ pinry/templates/users/private.html | 15 +++++++++++++++ pinry/templates/users/register.html | 22 ++++++++++++++++++++++ pinry/users/urls.py | 4 ++-- pinry/users/views.py | 4 ++-- 8 files changed, 63 insertions(+), 63 deletions(-) delete mode 100644 pinry/templates/user/login.html delete mode 100644 pinry/templates/user/private.html delete mode 100644 pinry/templates/user/register.html create mode 100644 pinry/templates/users/login.html create mode 100644 pinry/templates/users/private.html create mode 100644 pinry/templates/users/register.html diff --git a/pinry/templates/user/login.html b/pinry/templates/user/login.html deleted file mode 100644 index 1c446f2..0000000 --- a/pinry/templates/user/login.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Login{% endblock %} - -{% block yield %} -
-
-
-

Login

-
- {% csrf_token %} - {% for field in form %} - {% include "includes/field.html" %} - {% endfor %} -
- -
-
-
-
-
-{% endblock %} diff --git a/pinry/templates/user/private.html b/pinry/templates/user/private.html deleted file mode 100644 index 5b3096b..0000000 --- a/pinry/templates/user/private.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Private{% endblock %} - -{% block yield %} -
-
-
-

Private

-

This website is set to private. You need to login before you - can view any content.

-
-
-
-{% endblock %} diff --git a/pinry/templates/user/register.html b/pinry/templates/user/register.html deleted file mode 100644 index 13416aa..0000000 --- a/pinry/templates/user/register.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Register{% endblock %} - -{% block yield %} -
-
-
-

Register

-
- {% csrf_token %} - {% for field in form %} - {% include "includes/field.html" %} - {% endfor %} -
- -
-
-
-
-
-{% endblock %} diff --git a/pinry/templates/users/login.html b/pinry/templates/users/login.html new file mode 100644 index 0000000..1c446f2 --- /dev/null +++ b/pinry/templates/users/login.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} + +{% block title %}Login{% endblock %} + +{% block yield %} +
+
+
+

Login

+
+ {% csrf_token %} + {% for field in form %} + {% include "includes/field.html" %} + {% endfor %} +
+ +
+
+
+
+
+{% endblock %} diff --git a/pinry/templates/users/private.html b/pinry/templates/users/private.html new file mode 100644 index 0000000..5b3096b --- /dev/null +++ b/pinry/templates/users/private.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block title %}Private{% endblock %} + +{% block yield %} +
+
+
+

Private

+

This website is set to private. You need to login before you + can view any content.

+
+
+
+{% endblock %} diff --git a/pinry/templates/users/register.html b/pinry/templates/users/register.html new file mode 100644 index 0000000..13416aa --- /dev/null +++ b/pinry/templates/users/register.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} + +{% block title %}Register{% endblock %} + +{% block yield %} +
+
+
+

Register

+
+ {% csrf_token %} + {% for field in form %} + {% include "includes/field.html" %} + {% endfor %} +
+ +
+
+
+
+
+{% endblock %} diff --git a/pinry/users/urls.py b/pinry/users/urls.py index 2b3f506..70afc9a 100644 --- a/pinry/users/urls.py +++ b/pinry/users/urls.py @@ -4,7 +4,7 @@ from .views import CreateUser urlpatterns = patterns('', url(r'^login/$', 'django.contrib.auth.views.login', - {'template_name': 'user/login.html'}, name='login'), + {'template_name': 'users/login.html'}, name='login'), url(r'^logout/$', 'pinry.users.views.logout_user', name='logout'), url(r'^register/$', CreateUser.as_view(), name='register'), -) \ No newline at end of file +) diff --git a/pinry/users/views.py b/pinry/users/views.py index e546984..bc00154 100644 --- a/pinry/users/views.py +++ b/pinry/users/views.py @@ -16,7 +16,7 @@ reverse_lazy = lambda name=None, *args: lazy(reverse, str)(name, args=args) class CreateUser(CreateView): - template_name = 'user/register.html' + template_name = 'users/register.html' model = User form_class = UserCreationForm success_url = reverse_lazy('core:recent-pins') @@ -41,4 +41,4 @@ class CreateUser(CreateView): def logout_user(request): logout(request) messages.success(request, 'You have successfully logged out.') - return HttpResponseRedirect(reverse('core:recent-pins')) \ No newline at end of file + return HttpResponseRedirect(reverse('core:recent-pins'))