Ales Zoulek avatar Ales Zoulek committed 0d68ef6

ssi comments

Comments (0)

Files changed (6)


+{% load comments %}
+{% if settings.USE_SSI %}
+<!--# include virtual="{% url ssi-comments-list %}" -->
+{% else %}
+{% render_comment_list for article %}
+{% endif %}


+{% load comments %}
+{% render_comment_list for article %}


 urlpatterns = patterns('ng_proxy_test.content.views',
     url(r'^$', 'homepage', name='homepage'),
     url(r'^article/(?P<pk>\d+)/$', 'detail', name='detail'),
+    url(r'^ssi/comments/list/(?P<pk>\d+)/$', 'ssi_comments_list', name='ssi-comments-list'),


 from django.shortcuts import render_to_response
+from django.conf import settings
 from ng_proxy_test.content.models import Article
     return render_to_response(
+            'settings': settings,
+            'article': Article.objects.get(pk=pk)
+        },
+    )
+def ssi_comments_list(request, pk):
+    return render_to_response(
+        'ssi_comments_list.html',
+        {
             'article': Article.objects.get(pk=pk)


+    'django.contrib.comments',
     # Uncomment the next line to enable the admin:
     # Uncomment the next line to enable admin documentation:
+USE_SSI = True


     # Examples:
     # url(r'^$', 'ng_proxy_test.views.home', name='home'),
     url(r'^admin/', include(,
+    url(r'^comments/', include('django.contrib.comments.urls')),
     url(r'', include('ng_proxy_test.content.urls')),
     # Uncomment the admin/doc line below to enable admin documentation:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.