I looked into the code again and think I've found where the values
come from.

class CommentFormNode(BaseCommentNode):
    """Insert a form for the comment model into the context."""
...
            return comments.get_form()
(ctype.get_object_for_this_type(pk=object_pk))

The comments.get_form() will return a CommentForm, which is a child
class of CommentSecurityForm from django.contrib.comments.form

class CommentSecurityForm(forms.Form):
    ...
    def generate_security_data(self):
        ...
        security_dict =   {
            'content_type'  : str(self.target_object._meta),
            'object_pk'     : str(self.target_object._get_pk_val()),
            'timestamp'     : str(timestamp),
            'security_hash' : self.initial_security_hash(timestamp),
        }

So the content_type value is from target_object._meta

On Nov 30, 4:31 pm, photon <photo...@gmail.com> wrote:
> Mostly I followed the instruction 
> ofhttp://docs.djangoproject.com/en/dev/ref/contrib/comments/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to