Note that there are some explanatory texts on larger screens.

plurals
  1. PODJANGO COMMENTS_APP, how can i use it? Didn't work post comment
    primarykey
    data
    text
    <p>I try customize django comments module (delete field url) i create empty class VSComments and form </p> <pre><code>from django import forms from django.contrib.comments.forms import CommentForm from vs_comments.models import VSComment class VSCommentForm(CommentForm): """ No url Form """ VSCommentForm.base_fields.pop('url') </code></pre> <h3><code>__init__</code></h3> <pre><code>from vs_comments.models import VSComment from vs_comments.forms import VSCommentForm def get_model(): return VSComment def get_form(): return VSCommentForm </code></pre> <p>also url(r'^comments/', include('django.contrib.comments.urls')),</p> <p>include 'vs_comments' and 'django.contrib.comments' into INSTALLED_APPS and COMMENTS_APP = 'vs_comments'</p> <p>As result, I have right form, without url field, but posting comments doesn't work</p> <hr> <p>soution add to the form class</p> <pre><code>def get_comment_create_data(self): # Use the data of the superclass, and remove extra fields return dict( content_type = ContentType.objects.get_for_model(self.target_object), object_pk = force_unicode(self.target_object._get_pk_val()), comment = self.cleaned_data["comment"], name = self.cleaned_data["name"], submit_date = datetime.datetime.now(), site_id = settings.SITE_ID, is_public = True, is_removed = False, ) </code></pre> <p>For admin panel </p> <pre><code>class VSCommentAdmin(CommentsAdmin): """ all like native comments """ admin.site.register(Comment, CommentsAdmin) </code></pre> <p>But now didn't work tags render_comment_list and other. No any errors, only empty result How can I fix it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload