Is it overkill to use Django just to dispatch url requests and to reply with JSON (i.e. not using at all the HTML template engine)?
Thanks.
Best regards,
Charley
--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fac5482d-3d6d-4970-8700-61a710026ba5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
If the JSON is related to a data model, and if this model is elaborated and subject to evolution in the furure, Django can help a lot. Add Django RESTFramework to the combo to take care of the REST stuff.
If not, I'd suggest Falcon (https://falconframework.org/), which is a light and very efficient framework made for developing
REST based services. I've used it quite a lot for writing micro-services
of a complex platform. Services working with data models are developed on top of Django. The other ones are Falcon based.
Eric
Hi Charley,
You should not regret this choice.
Sometimes Django seems a bit overkill at the first glance. But most of the times,
once the project has made some progress you'll quickly appreciate the fact it is like Python : batteries included. No need to hunt for external add-ons which will integrate more or less easily when it comes to take care of CORS, CSRF, sessions,
I18N,... All is already here for free. I could verify this on a Flask based project : you're left alone when time comes for you to find the right LEGO blocks and make then fit together. Django creators have already made this for you, and they're very smart
people.
And of course the default Django configuration can be optimized by removing middlewares and features you don't need to cut it down to the strict necessary. So, why bother ?
Regards
Eric
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/VI1P193MB04325B2D1B8CF0A98E5C3C2A8CF20%40VI1P193MB0432.EURP193.PROD.OUTLOOK.COM.