Hi Mikhailo
I think the problem is with views. Because when I run the API, it is giving 
me the default root view that django provide for API. When I entered the 
values in form and then 
when i post the data, at that time I'm getting this error.
In serializers When I make a small change It is showing me different error 
like this.
"AssertionError at /post/
No exception message supplied"
here is the code for serializers that I modify
serializers.py
from rest_framework import serializers
from models import Post, Comments


class PostSerializer(serializers.ModelSerializer):
class Meta:
model = Post
fields = '__all__'

class CommentsSerializer(serializers.ModelSerializer):
class Meta:
model = Comments
fields = '__all__'

I'm new to django. Can you tell me how can I debug the code? Should I use 
try-catch?

On Monday, August 20, 2018 at 10:18:56 PM UTC+5:30, Mikhailo Keda wrote:
>
> rest_framework_mongoengine was updated 1 year ago, according to djongo 
> docs they have integration with Django Rest Framework, try to use Django 
> Rest Framework instead of rest_framework_mongoengine.
> And you need debug the error.
>
> понеділок, 20 серпня 2018 р. 14:36:15 UTC+3 користувач Sagar написав:
>>
>> Hi Mikhailo
>> Yes you are right, but I didn't used django-nonrel or djangotoolbox. 
>> Those were totally outdated. I have used djongo which is updated as far as 
>> I know. About MongoDB, I'm working on project in which we used MongoDB. We 
>> want to use NoSQL database insted of SQL database. Did you work with django 
>> and mongodb before?
>>
>

-- 
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+unsubscr...@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/80c3b71c-c613-4474-b513-cf302ef3843f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to