Commits

Lucian Brănescu-Mihăilă  committed 09b8dde

Changes working towards comments.

  • Participants
  • Parent commits e856390

Comments (0)

Files changed (3)

 
 import os
 
-# Activate django-dbindexer for the default database
-#DATABASES['native'] = DATABASES['default']
+# Make sure the high replication datastore is used, since otherwise
+# djangoappengine messes up its models. Should be the default anyway, with 2.7
 DATABASES['native'] = {
     'ENGINE': 'djangoappengine.db',
     'HIGH_REPLICATION': True,
 
 INSTALLED_APPS = (
 #    'django.contrib.admin',
+    'django.contrib.comments',
     'django.contrib.contenttypes',
     'django.contrib.auth',
     'django.contrib.sessions',

File templates/show.html

 {% extends "base.html" %}
+{% load comments %}
 
 {% block title %} {{ title }} {% endblock %}
 
 <h2> {{ post.title }} </h2>
 {{ post.content }}
 
+{% render_comment_list for post %}
+
+{% render_comment_form for post %}
+
 {% endblock %}
                            model=Blog,
                            success_url="/"),
         name='delete'),
+    
+    url(r'^comments/', include('django.contrib.comments.urls')),
 
     # Uncomment the admin/doc line below to enable admin documentation:
     # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),