Bladeren bron

Fix template locations to match app name

tags/v1.0.0
Isaac Bythewood 11 jaren geleden
bovenliggende
commit
32b5eafe67
5 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  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 Bestand weergeven


pinry/templates/user/private.html → pinry/templates/users/private.html Bestand weergeven


pinry/templates/user/register.html → pinry/templates/users/register.html Bestand weergeven


+ 2
- 2
pinry/users/urls.py Bestand weergeven

@@ -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 Bestand weergeven

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

Laden…
Annuleren
Opslaan