Skip to content

Commit

Permalink
Moving the forums templates into a better namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Socol committed Jun 2, 2010
1 parent b1015bd commit b4d82b6
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/forums/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def build_notification(post):
ct = ContentType.objects.get_for_model(post.thread)

subject = _('Reply to: %s') % post.thread.title
t = loader.get_template('email/new_post.ltxt')
t = loader.get_template('forums/email/new_post.ltxt')
c = {'post': post.content, 'author': post.author.username,
'thread_title': post.thread.title,
'post_url': post.get_absolute_url()}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions apps/forums/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def forums(request):

forums_ = paginate(request, Forum.objects.all())

return jingo.render(request, 'forums.html', {'forums': forums_})
return jingo.render(request, 'forums/forums.html', {'forums': forums_})


def sort_threads(threads_, sort=0, desc=0):
Expand Down Expand Up @@ -71,7 +71,7 @@ def threads(request, forum_slug):
feed_url = reverse('forums.threads.feed',
kwargs={'forum_slug': forum_slug})

return jingo.render(request, 'threads.html',
return jingo.render(request, 'forums/threads.html',
{'forum': forum, 'threads': threads_,
'sort': sort, 'desc_toggle': desc_toggle,
'feed_url': feed_url})
Expand All @@ -95,7 +95,7 @@ def posts(request, forum_slug, thread_id, form=None):
kwargs={'forum_slug': forum_slug,
'thread_id': thread_id})

return jingo.render(request, 'posts.html',
return jingo.render(request, 'forums/posts.html',
{'forum': forum, 'thread': thread,
'posts': posts_, 'form': form,
'feed_url': feed_url})
Expand Down Expand Up @@ -129,7 +129,7 @@ def new_thread(request, forum_slug):

if request.method == 'GET':
form = NewThreadForm()
return jingo.render(request, 'new_thread.html',
return jingo.render(request, 'forums/new_thread.html',
{'form': form, 'forum': forum})

form = NewThreadForm(request.POST)
Expand All @@ -147,7 +147,7 @@ def new_thread(request, forum_slug):
kwargs={'forum_slug': thread.forum.slug,
'thread_id': thread.id}))

return jingo.render(request, 'new_thread.html',
return jingo.render(request, 'forums/new_thread.html',
{'form': form, 'forum': forum})


Expand Down Expand Up @@ -216,7 +216,7 @@ def edit_thread(request, forum_slug, thread_id):
url = reverse('forums.posts', args=[forum_slug, thread_id])
return HttpResponseRedirect(url)

return jingo.render(request, 'edit_thread.html',
return jingo.render(request, 'forums/edit_thread.html',
{'form': form, 'forum': forum, 'thread': thread})


Expand Down Expand Up @@ -249,7 +249,7 @@ def delete_thread(request, forum_slug, thread_id):
def edit_post(request, forum_slug, thread_id, post_id):
"""Edit a post."""

return jingo.render(request, 'bad_reply.html')
return jingo.render(request, 'forums/bad_reply.html')


@login_required
Expand All @@ -264,7 +264,7 @@ def delete_post(request, forum_slug, thread_id, post_id):

if request.method == 'GET':
# Render the confirmation page
return jingo.render(request, 'confirm_post_delete.html',
return jingo.render(request, 'forums/confirm_post_delete.html',
{'forum': forum, 'thread': thread,
'post': post})

Expand Down

0 comments on commit b4d82b6

Please sign in to comment.