2👍
Another good idea would be to use Swagger. In Django, especially using DRF, you have the opportunity to integrate with Django Rest Swagger and generate automatic documentation for your endpoints. The only requirement is to provide with docstrings-documentation your API classes and methods.
ps: I have no affiliation with django rest swagger package or authors, just a frequent user
-4👍
Ok first , to be more pratical, your create function needs to be like this
def create(self,request, *args,**kwargs):
data = request.data
logger.debug("%s" % data)
request = (self.__dict__['request'])
#parse the rest of your code here
Also , why can’t you swagger to easily set up your documentation it’s going to be more easier for you, or maybe it’s a requirement for you
- [Django]-Get javascript variable's value in Django url template tag
- [Django]-Django model validator not working on create
- [Django]-Are Django SECRET_KEY's per instance or per app?
Source:stackexchange.com