From d5fe39931ede5fa14a7695d4ac0a7ba3921a13ee Mon Sep 17 00:00:00 2001 From: Alex Lewis Date: Fri, 28 Sep 2012 22:29:26 +1000 Subject: [PATCH] Templates Moved pages into relevant folders, updated core views --- bodyrep/apps/core/views.py | 10 +++++----- bodyrep/templates/{ => core}/auth/login.html | 0 bodyrep/templates/{app => core}/landing.html | 0 bodyrep/templates/{app => core/member}/profile.html | 0 bodyrep/templates/{app => core/user}/editProfile.html | 0 .../{app/member.html => core/user/index.html} | 0 6 files changed, 5 insertions(+), 5 deletions(-) rename bodyrep/templates/{ => core}/auth/login.html (100%) rename bodyrep/templates/{app => core}/landing.html (100%) rename bodyrep/templates/{app => core/member}/profile.html (100%) rename bodyrep/templates/{app => core/user}/editProfile.html (100%) rename bodyrep/templates/{app/member.html => core/user/index.html} (100%) diff --git a/bodyrep/apps/core/views.py b/bodyrep/apps/core/views.py index e370008..04ff199 100644 --- a/bodyrep/apps/core/views.py +++ b/bodyrep/apps/core/views.py @@ -28,11 +28,11 @@ from utils.user_functions import get_user, ajax_login_required from utils.view_functions import get_argument_or_404, render_to, is_true #from utils.ratelimit import ratelimit -@render_to('app/landing.html') +@render_to('core/landing.html') def index(request): return {} -@render_to('app/member.html') +@render_to('core/user/index.html') def showUserProfile(request): if request.user.is_anonymous(): return login(request) @@ -40,7 +40,7 @@ def showUserProfile(request): member = Members.objects.get(username=request.user.username) return {'member': member} -@render_to('app/profile.html') +@render_to('core/member/profile.html') def showMemberProfile(request, username): member = Members.objects.get(username=username) @@ -50,7 +50,7 @@ def showMemberProfile(request, username): return { 'user': request.user, 'member': member } @never_cache -@render_to('auth/login.html') +@render_to('core/auth/login.html') def login(request): if not request.user.is_anonymous(): return HttpResponseRedirect(reverse('mprofile')) @@ -90,7 +90,7 @@ def logout(request): @ajax_request -@render_to('app/editProfile.html') +@render_to('core/user/editProfile.html') def editUserProfile(request): if request.user.is_anonymous(): return login(request) diff --git a/bodyrep/templates/auth/login.html b/bodyrep/templates/core/auth/login.html similarity index 100% rename from bodyrep/templates/auth/login.html rename to bodyrep/templates/core/auth/login.html diff --git a/bodyrep/templates/app/landing.html b/bodyrep/templates/core/landing.html similarity index 100% rename from bodyrep/templates/app/landing.html rename to bodyrep/templates/core/landing.html diff --git a/bodyrep/templates/app/profile.html b/bodyrep/templates/core/member/profile.html similarity index 100% rename from bodyrep/templates/app/profile.html rename to bodyrep/templates/core/member/profile.html diff --git a/bodyrep/templates/app/editProfile.html b/bodyrep/templates/core/user/editProfile.html similarity index 100% rename from bodyrep/templates/app/editProfile.html rename to bodyrep/templates/core/user/editProfile.html diff --git a/bodyrep/templates/app/member.html b/bodyrep/templates/core/user/index.html similarity index 100% rename from bodyrep/templates/app/member.html rename to bodyrep/templates/core/user/index.html