Django-bridge

Latest version: v0.4

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.4.0

What's Changed

Improvements for unit testing

This release brings a couple of improvements to simplify writing unit tests for Django bridge views.

Firstly, we've added a custom `TestCase` class to make testing Django Bridge views feel more similar to testing regular Django views. This class:

- Adds the `X-Requested-By: DjangoBridge` header to all "GET" and "POST" requests so you no longer have to pass in `HTTP_X_REQUESTED_BY="DjangoBridge"` keyword argument.
- Customises the `assertRedirects` method to work with Django-bridge redirect responses (which are converted from 302 to 200 to allow the frontend library to process them properly)

Secondly, `Response` objects now include the unserialised props making it easier to assert against serialized Python objects (like forms).

For example, you can now use `assertFormError` in your tests!

python
tests.py

class TestMyForm(TestCase):
def test_post_invalid(self):
response = self.client.post("/form", {})

self.assertFormError(
response.props["form"], "required_field", "This field is required."
)


Initial Next.js support

We've created a new NPM package called `django-render/next` to allow creating static websites that are backed by Django.

This includes the basic utilities required to render a django-render response with Next.js, including converting objects like forms into JS objects. It currently excludes context providers, `<Link>` and `<Form>` components (use the next.js provided versions instead) and overlays.

There's still a lot of work to do here, so keep your eyes on this space. Please reach out in [discussions](https://github.com/orgs/django-bridge/discussions) if you'd like to use next.js or contribute to improve its support!

Full list of significant changes

* Add some test utilities by kaedroho in https://github.com/django-bridge/django-bridge/pull/64
* Add support for Python 3.13 and Django 5.1 by kaedroho in https://github.com/django-bridge/django-bridge/pull/65
* Implement a Metadata type by kaedroho in https://github.com/django-bridge/django-bridge/pull/23
* RenderFrame component by kaedroho in https://github.com/django-bridge/django-bridge/pull/24
* Add an NPM package for Next.js by kaedroho in https://github.com/django-bridge/django-bridge/pull/67
* Implement pushMessages with a reducer by kaedroho in https://github.com/django-bridge/django-bridge/pull/75
* Delete packages/create-django-bridge directory by kaedroho in https://github.com/django-bridge/django-bridge/pull/78


**Full Changelog**: https://github.com/django-bridge/django-bridge/compare/v0.3.2...v0.4.0

0.3.2

What's Changed
* Rename create-django-bridge package by kaedroho in https://github.com/django-bridge/django-bridge/pull/39
* Remove unnecessary surrounding <div> tag by kaedroho in https://github.com/django-bridge/django-bridge/pull/49
* Fix: info message level by stevebma in https://github.com/django-bridge/django-bridge/pull/53
* Fix history state duplicating on page load by auburnsummer in https://github.com/django-bridge/django-bridge/pull/61

New Contributors
* stevebma made their first contribution in https://github.com/django-bridge/django-bridge/pull/53
* auburnsummer made their first contribution in https://github.com/django-bridge/django-bridge/pull/61

**Full Changelog**: https://github.com/django-bridge/django-bridge/compare/v0.3...v0.3.2

0.3

Django Render has now been renamed to Django Bridge!

Because the `django-bridge` package already existed on PyPI, we've bumped the version up to v0.3 to not conflict with any previously released packages with the same name.

What's Changed

* bump storybook version by stefanlesik in https://github.com/django-bridge/django-bridge/pull/33
* Rename to Django Bridge by kaedroho in https://github.com/django-bridge/django-bridge/pull/35
* Rename django-bridge/core to django-bridge/react by kaedroho in https://github.com/django-bridge/django-bridge/pull/37
* Rename PyPI package to django-bridge and bump version to 0.3 by kaedroho in https://github.com/django-bridge/django-bridge/pull/38


**Full Changelog**: https://github.com/django-bridge/django-bridge/compare/v0.1...v0.3

0.1

0.1rc2

What's Changed

* Set closeBlocked when form is dirty by stefanlesik in https://github.com/kaedroho/django-render/pull/17
* Fix typo in explanation why django render could not be a good fit by derneuere in https://github.com/kaedroho/django-render/pull/18
* Request overlay close when main window is navigated by kaedroho in https://github.com/kaedroho/django-render/pull/27
* Don't call overlay onClose callback when user navigates away by kaedroho in https://github.com/kaedroho/django-render/pull/29
* Rename deserializers to adapters by kaedroho in https://github.com/kaedroho/django-render/pull/30
* Fix messages not clearing on form submit by kaedroho in https://github.com/kaedroho/django-render/pull/31
* Remove OverlayContext.closeBlocked. Add DirtyFormContext.unloadBlocked by kaedroho in https://github.com/kaedroho/django-render/pull/32

New Contributors
* stefanlesik made their first contribution in https://github.com/kaedroho/django-render/pull/17
* derneuere made their first contribution in https://github.com/kaedroho/django-render/pull/18

**Full Changelog**: https://github.com/kaedroho/django-render/compare/v0.1rc1...v0.1rc2

0.1rc1

What's Changed
* Remove "Unknown view 'loading'" on initial load by kaedroho in https://github.com/kaedroho/django-render/pull/10
* Fix crash when there's no CSS in the bundle by kaedroho in https://github.com/kaedroho/django-render/pull/11
* Don't report blocked close request when close not requested by kaedroho in https://github.com/kaedroho/django-render/pull/13
* Refactor navigation controllers to use React state management by kaedroho in https://github.com/kaedroho/django-render/pull/14
* Delete messages when main browser window navigates by kaedroho in https://github.com/kaedroho/django-render/pull/15


**Full Changelog**: https://github.com/kaedroho/django-render/compare/v0.1b7...v0.1rc1

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.