From ba3cdfee16ca65da218c7a9724b6d3a7a770fc81 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 24 Feb 2007 21:26:12 -0800 Subject: work on integrating comments universally --- .../photos/templates/photos/photo_detail.html | 20 ++++++++++++ bn_django/templates/base.html | 1 + bn_django/templates/comment_list | 16 ++++++++++ bn_django/templates/comments/form.html | 36 ++++++++++++++++++++++ bn_django/templates/comments/freeform.html | 13 ++++++++ 5 files changed, 86 insertions(+) create mode 100644 bn_django/templates/comment_list create mode 100644 bn_django/templates/comments/form.html create mode 100644 bn_django/templates/comments/freeform.html (limited to 'bn_django') diff --git a/bn_django/photos/templates/photos/photo_detail.html b/bn_django/photos/templates/photos/photo_detail.html index 10bf8ba..0d5398d 100644 --- a/bn_django/photos/templates/photos/photo_detail.html +++ b/bn_django/photos/templates/photos/photo_detail.html @@ -1,5 +1,6 @@ {% extends "photos/base.html" %} {# {% load markup %} #} +{% load comments %} {% block path %} {{ block.super }} @@ -94,6 +95,25 @@ {% else %}

This is not the photo you are looking for.

{% endif %} +{% endblock %} +{% block commentary %} +
+{% load comments %} +{% if user.is_authenticated %} +{% comment_form for photos.photo photo.id with is_public yes %} +comment form:
+{% include "comments/form.html" %} +{% else %} +{% free_comment_form for photos.photo photo.id with is_public yes %} +free comment form:
+{% include "comments/freeform.html" %} +{% endif %} + +comment list:
+{% get_comment_list for photos.photo photo.id as comments %} +{% get_free_comment_list for photos.photo photo.id as free_comments %} +{% include "comment_list" %} +
{% endblock %} diff --git a/bn_django/templates/base.html b/bn_django/templates/base.html index 0df7a36..ad46a37 100644 --- a/bn_django/templates/base.html +++ b/bn_django/templates/base.html @@ -55,6 +55,7 @@ Here lies content! {% endblock %} +{% block commentary %} {% endblock %}