Commits

Anonymous committed 004616d

closed comment form

  • Participants
  • Parent commits ad4e66c

Comments (0)

Files changed (4)

File blog/models.py

 
     def __unicode__(self):
         return self.name
-    
+
     def get_absolute_url(self):
         return self.entry.get_absolute_url()
 

File blog/templates/blog/entry_detail.html

     {% endif %}
 </div>
 
+
 <div id="comments" class="content-box">
     <h3>{% trans "Comments" %}</h3>
+    <p>スパムコメントしか来ないのでコメント欄はリードオンリーです。コメントはTwitterなどでおねがいします。</p>
     {% if obj.comments_count %}
     {% for comment in obj.comment_set.all %}
     <div class="response">
     {% endif %}
 </div>
 
+{% comment %}
 {% if form %}
 <div id="comment-form" class="content-box">
     <h3>{% trans "Add Comment" %}</h3>
     </form>
 </div>
 {% endif %}
+{% endcomment %}
 {% endblock %}
 
 {% comment %}

File blog/views.py

         raise Http404
     status_code = 200
     form = CommentForm(request.POST.copy() or None, auto_id='comment-%s')
-    if request.method == 'POST':
-        if form.is_valid():
-            comment = form.save(commit=False)
-            comment.entry = obj
-            comment.save()
-            return HttpResponseRedirect(comment.get_absolute_url())
-        else:
-            status_code = 403
+    #if request.method == 'POST':
+    #    if form.is_valid():
+    #        comment = form.save(commit=False)
+    #        comment.entry = obj
+    #        comment.save()
+    #        return HttpResponseRedirect(comment.get_absolute_url())
+    #    else:
+    #        status_code = 403
     c = RequestContext(request, {
         'form': form,
         'obj': obj,
     #(r'^admin/doc/', include('django.contrib.admindocs.urls')),
 
     # Uncomment this for admin:
-    (r'^admin-console/(.*)', admin.site.root),
+    (r'^admin-console/(.*)', admin.site.urls),
     #(r'^ma/(.*)', mobileadmin.sites.site.root),
 )