I have a class with name of Request
and I want to get first object of it in mongoengine
I think I can use this :
first get all objects like this
visitors = Request.objects.all()
and then
ss = visitors[0].ip
and then call an attribute of object
It's simple just use :
Request.objects.first()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With