Re:Don't make me think, or why I switched to Rails from Java...
by systemvoltage on Friday February 04, 2022 @12:01PM
(#30209395)
Do most people use Django as a server-side framework (no frontend-JS or very minimal JS, may be jQuery)? Or, is it mostly used as an API to interact with the React/Angular/etc front-end framework? What I am trying to get at is do people still build POST-redirect-GET patterns and such for form submissions or they use Django in a more 'modern' way?
[ Parent
| on HN ]
Re:Don't make me think, or why I switched to Rails from Java...
by reducesuffering on Friday February 04, 2022 @05:16PM
(#30214113)
From my recent foray into modern Django world, most simple projects and MVP start out as server side like the official guide. Then, when people need some extra frontend magic like React and/or SPA, it's pretty easy to insert into Django. You just include the bundled React/Vue app into a js script still included and served by the same Django route/view/template. Of course, it's also common to start transitioning to Django Rest Framework (DRF) as your API points.
Re:Don't make me think, or why I switched to Rails from Java...
by kbaker on Friday February 04, 2022 @12:15PM
(#30209589)
You can use either or both... server-side comes out of the box, and is used by the getting started tutorial. API-based is also very common using django-rest-framework.
I'd say it is still a mix of both and both paths are well-supported and well-maintained.