python - how to post a new comment through a method in django? -


i using 'django_comments' commenting in site. want post new comment via method in 'views.py'.

i searched , found posting comments using {{ forms }} in templates.

so how can post new comment through method. please me.. , in advance.

you don't have use form, or post request matter. need create instance of comment model can via django's orm.

to this, need have of necessary parameters model expects, it's simple as:

comment = comment.objects.create(**params) 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -