In the last days I create severals REST APIs, and I think this is very
arduous, because we write the same thing several times, and this is not
the Django propose. So I'm thinkin to create a new feature, it's like
Django Admin, but to create REST APIs easily. It's works registering the
models, specifing fields and etc, a lot like Django Admin. I didn't start
create it yet, but if you allow I can start.
Sincerely, Guilherme Isaías
My email: guil...@guilhermeweb.dev
--
Ticket URL: <https://code.djangoproject.com/ticket/32362>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => wontfix
Comment:
There is already an excellent 3rd party package that you can use `django-
rest-framework`.
--
Ticket URL: <https://code.djangoproject.com/ticket/32362#comment:1>
Comment (by Carlton Gibson):
#33884 was closes as a duplicate. I was going to comment there with some
breadcrumbs.
This is essentially a duplicate of #21442, plus see also #32646, #32259,
as well as [https://forum.djangoproject.com/t/technical-board-vote-on-
ticket-32259-modernize-request-attribute-names/10255 this discussion on
the Django Forum], and experiments such as [https://github.com/kezabelle
/django-formality kezabelle/django-formality].
There's plenty of groundwork going on... — one of the first steps would be
to tease-out
[https://github.com/django/django/blob/89e695a69b16b8c0e720169b3ca4852cfd0c485f/django/http/request.py#L350
the request body parsing from `_load_post_and_files()`] so that we might
add a `request.data` property that was able to handle (by default) by JSON
and form-encoded data, plus multipart. I think if we can make progress
there, we wouldn't be too far off. (Parts such as JSONResponse are already
in place — you can do this already, but it's still a little manual…)
--
Ticket URL: <https://code.djangoproject.com/ticket/32362#comment:2>