Django Render: A simpler way to build Django applications with React frontends

Hey Everyone,

I’d like to share my new project I’m calling Django Render. My Goal with this project is to make it as easy as possible to build and maintain React frontends for Django.

Github: GitHub - kaedroho/django-render: The simple way to build Django applications with React frontends
Website and docs: https://django-render.org/

Django Render allows you to build a fully client-rendered React application that is backed by Django views. It also supports Django forms, session authentication and messages.

It works by routing all requests through your Django URL config and the views return JSON (instead of HTML) describing to the frontend what should be rendered. This means you don’t need to build API clients, client-side routing, and all application logic can be on the server.

I started working on it as a way to port Wagtail CMS’s front-end to React. I’ve since found it to be a simple and productive way to build any kind of application with Django and React. So I’ve been working on turning this into an open source project so that I can use it to build open-source apps and find others who are interested in working on it with me.

I’ve just released 0.1rc1, so the final 0.1 release is due in a couple of weeks. Let me know what you think!

4 Likes

This is awesome! I love the React library, but I’m not a fan of managing a separate client outside of the Django backend. Hopefully, this project can evolve to streamline that.

Thanks!

My thinking behind keeping the source code for the client separate was to keep it to standard that most frontend devs would be familar with. I also wasn’t keen on introducing any magic to allow the JS to exist within the Django project structure.

But I do agree that having all the code for each app localised makes it easier to work on larger projects, I’d definitely be open to ability to optionally put JS component code in the Django app structure if it could be done in a simple enough way.

For hosting, all the FE code gets compiled and served as a static file, so you don’t need Node.js on the server.