I'm currently working on DRF.
models.py
class Post(models.Model):
id = models.IntegerField()
content = models.CharField()
category = models.CharField()
created = models.CharField()
Below, the Response I want to get
[
{
"id": "1",
"content": "a",
"category": "post",
"created": "2020-01-23"
},
{
"id": "3",
"content": "b"
},
]
How can I get the response like above just using ONE model.