Browse Source

Fix template locations to match app name

tags/v1.0.0
Isaac Bythewood 11 years ago
parent
commit
32b5eafe67
5 changed files with 4 additions and 4 deletions
  1. +0
    -0
      pinry/templates/users/login.html
  2. +0
    -0
      pinry/templates/users/private.html
  3. +0
    -0
      pinry/templates/users/register.html
  4. +2
    -2
      pinry/users/urls.py
  5. +2
    -2
      pinry/users/views.py

pinry/templates/user/login.html → pinry/templates/users/login.html View File


pinry/templates/user/private.html → pinry/templates/users/private.html View File


pinry/templates/user/register.html → pinry/templates/users/register.html View File


+ 2
- 2
pinry/users/urls.py View File

@@ -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'),
)
)

+ 2
- 2
pinry/users/views.py View File

@@ -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'))
return HttpResponseRedirect(reverse('core:recent-pins'))

Loading…
Cancel
Save