Django Bridge
Django Bridge lets you build React applications with Django views.
- Use Django views, URLs, and forms to build single page applications
- Render your frontend with React using any component library or styling framework
- No REST API or GraphQL layer needed — views return everything a page needs in one request
- Works with Django middleware, auth, forms, and extensions like django-allauth
- Hot-reloading in development for fast iteration
- Serialize Python objects (including forms and widgets) directly into React props
Example
A Django view returns a response specifying which React component to render and what props to pass:
from django_bridge import Response
def form_view(request):
form = MyForm(request.POST or None)
if form.is_valid():
# Form submission logic here
return Response(request, "FormView", {
"action_url": reverse("form"),
"form": form,
})
The React component receives those props and renders the page: