Thx for your answer. 😁 but this brings me to the second point. If I do that I must to rewrite all method in my API Class Based Views to response with this format. I think that is not the best way to deal with this problem. What do you think?
El sáb., 4 jul. 2020 a las 7:53, Arpana Mehta (<arpana11me...@gmail.com>) escribió: > You can use a function which > > returns Response({'status': 'SUCCESS'}) > > On Sat, 4 Jul 2020, 03:24 Ronaldo Mata, <ronaldomat...@gmail.com> wrote: > >> Hi Guys >> >> Somebody can help me? >> >> I want to create a custom response with the follow format: >> >> { >> "status": true, >> "message": "Any message", >> "data": []} >> >> >> but I don't want create a custom_response function because I must to >> modified all Api class based views response. What is the best way to deal >> with this? >> >> -- >> 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 view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAP%3DoziQW9yHM74Pyc2bYzik0RJFQua1-qWNuE%2B%2B4OU%2BGoutRZA%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAP%3DoziQW9yHM74Pyc2bYzik0RJFQua1-qWNuE%2B%2B4OU%2BGoutRZA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAGyqUuVGdobfwZgwmUsWj94YWimTNwhE0aYmi9seZAYU7TkaCw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAGyqUuVGdobfwZgwmUsWj94YWimTNwhE0aYmi9seZAYU7TkaCw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAP%3DoziTUi-B3OPZ9U6US8p2Jm%3DXGmrGs%2BHvXBXQvCYDAYjtMTw%40mail.gmail.com.