Wednesday, December 23, 2015

Re: Commenting system to use to build with REST API

You can write your own system with just two models - Post and Comment. Then write custom serializers and viewsets to submit comments. 
It's an easy task and won't take much of your time. 

I've worked in similar fashion on few of my own works. Here is a link of custom models I wrote: https://github.com/bird-labs/MHRDApp-Server/blob/master/post/models.py


On Wed, 23 Dec 2015 at 23:40 amarshall <adriandm10@gmail.com> wrote:
Hi, I'm working on an android app and using django as the backend. I created an api using django rest framework and everything is fine so far. I want to add commenting to my main object. i.e - lets call it a "Post". I want each post to have a set of comments associated with it. simple comments.one after the other. I'm not looking to do threaded commenting. What is the best way I should go about doing this?

I see apps like Disquis and django-comments-xtd, but they all seem to just use the templating system on the web front end. I just want the data in some text/JSON format and send it to android(or any other device). i.e [ comments: {id:1,user: User23,comment: I totally agree } }

Also, I seen this post: http://stackoverflow.com/questions/28369418/struggling-to-get-django-comments-to-work-with-django-rest-framework
and wondered should I try still using django.contrib.comments even though it's depreciated ?

I'm using Django verson 1.8.4

Any advice would be great. Thanks.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/12c52875-c1f1-4465-ade7-37dc5dca75c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAByqUgga8C_s9R6--OguE%3DLs0bOrWmp3q2w9CfUVonSThs5GvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment