Idea

73 views
Skip to first unread message

abdul azeez

unread,
Sep 14, 2021, 9:44:39 AM9/14/21
to Django developers (Contributions to Django itself)
Pls can we make django come with django reest framework settings when you start a project

Adam Johnson

unread,
Sep 15, 2021, 5:40:27 PM9/15/21
to django-d...@googlegroups.com
DRF remains an extension to Django. We don't want Django to depend on it.

But you're free to set up a startproject template that includes the settings, and use that. https://docs.djangoproject.com/en/3.2/ref/django-admin/#cmdoption-startproject-template

On Tue, 14 Sept 2021 at 08:44, abdul azeez <replym...@gmail.com> wrote:
Pls can we make django come with django reest framework settings when you start a project

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/b91e5471-23d3-41e2-b5c5-e1f860739fe0n%40googlegroups.com.

Michael Urban

unread,
Sep 15, 2021, 7:36:35 PM9/15/21
to django-d...@googlegroups.com
For YEARS I’ve wanted a REST solution included with Django. DRF hasn’t never felt like a great fit for Django projects. It’s very Rails-y.

It would be amazing to have an official Django contrib package for REST.

Never going to happen, but needs to be said.

Best,
Mike 

Benny

unread,
Sep 15, 2021, 8:59:08 PM9/15/21
to django-d...@googlegroups.com
There are serializers and dictionaries built into the Django models system that I’ve had zero problems leveraging for building out JSON (or REST-like) objects for endpoint purposes. I personally believe integrating DRF into Django would needlessly bloat it. The two play together perfectly fine if you really need them both.

I’d recommend digging around in the guts of Django. You’ll find some pretty neat things there!

Just my 2 cents,
Benny  

On Sep 15, 2021, at 6:36 PM, Michael Urban <mi...@astoria.io> wrote:



Curtis Maloney

unread,
Sep 15, 2021, 9:21:01 PM9/15/21
to 'Mike Hansen' via Django developers (Contributions to Django itself)
Additionally, incorporating DRF [or any other 3rd party lib] into core would lock them into Django's release cycle.

As for built-in REST/API features, Django provides `JsonResponse` already, so the main piece lacking is de/serialisers.

The built in serializer framework is well suited to generating fixtures, and _can_ be bent to serialising your data for APIs, but does not provide any solution for validating input.

Our existing input validation solution - Forms - is not so good at handling complex or deeply nested data structures.

However, in recent years tools, like pydantic and marshmallow, have begun filling this space.

One place we could help everyone is by providing a JSON request-body parsing utility.

--
Curtis
Reply all
Reply to author
Forward
0 new messages