All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- The
idom
client will automatically configure itself to debug mode depending onsettings.py:DEBUG
. use_connection
hook for returning the browser's activeConnection
- The
component
template tag now supports both positional and keyword arguments. - The
component
template tag now supports non-serializable arguments. IDOM_WS_MAX_RECONNECT_TIMEOUT
setting has been renamed toIDOM_RECONNECT_MAX
.- It is now mandatory to run
manage.py migrate
after installing IDOM. - Bumped the minimum IDOM version to 0.43.0
django_idom.hooks.use_websocket
has been removed. The similar replacement isdjango_idom.hooks.use_connection
.django_idom.types.IdomWebsocket
has been removed. The similar replacement isdjango_idom.types.Connection
view_to_component
will now retain any HTML that was defined in a<head>
tag.- React client is now set to
production
rather thandevelopment
. use_query
will now utilizefield.related_name
when postprocessing many-to-one relationships
- Fixed a potential method of component template tag argument spoofing.
- Exception information will no longer be displayed on the page, based on the value of
settings.py:DEBUG
.
2.2.1 - 2022-01-09
- Fixed bug where
use_query
would not recursively fetch many-to-one relationships. - IDOM preloader will now print out the exception stack when failing to import a module.
2.2.0 - 2022-12-28
- Add
options: QueryOptions
parameter touse_query
to allow for configuration of this hook.
- By default,
use_query
will recursively prefetch all many-to-many or many-to-one relationships to preventSynchronousOnlyOperation
exceptions.
django_idom.hooks._fetch_lazy_fields
has been deleted. The equivalent replacement isdjango_idom.utils.django_query_postprocessor
.
2.1.0 - 2022-11-01
- Minimum
channels
version is now4.0.0
.
- Change type hint on
view_to_component
callable to haverequest
argument be optional. - Change type hint on
view_to_component
to represent it as a decorator with parenthesis (such as@view_to_component(compatibility=True)
)
- Add note to docs about potential information exposure via
view_to_component
when usingcompatibility=True
.
2.0.1 - 2022-10-18
- Ability to use
key=...
parameter on all prefabricated components.
2.0.0 - 2022-10-17
use_origin
hook for returning the browser'slocation.origin
.
view_to_component
now returns aCallable
, instead of directly returning aComponent
. Check the docs for new usage info.use_mutation
anduse_query
will now log any query failures.
- Allow
use_mutation
to haverefetch=None
, as the docs suggest is possible. use_query
will now prefetch all fields to preventSynchronousOnlyOperation
exceptions.view_to_component
,django_css
, anddjango_js
type hints will now display like normal functions.- IDOM preloader no longer attempts to parse commented out IDOM components.
- Tests are now fully functional on Windows
1.2.0 - 2022-09-19
auth_required
decorator to prevent your components from rendering to unauthenticated users.use_query
hook for fetching database values.use_mutation
hook for modifying database values.view_to_component
utility to convert legacy Django views to IDOM components.
- Bumped the minimum IDOM version to 0.40.2
- Testing suite now uses
playwright
instead ofselenium
- IDOM preloader is no longer sensitive to whitespace within template tags.
1.1.0 - 2022-07-01
django_css
anddjango_js
components to defer loading CSS & JS files until needed.
- Bumped the minimum IDOM version to 0.39.0
1.0.0 - 2022-05-22
- Django-specific hooks!
use_websocket
,use_scope
, anduse_location
are now available within thedjango_idom.hooks
module. - Documentation has been placed into a formal docs webpage.
- Logging for when a component fails to import, or if no components were found within Django.
idom_component
template tag has been renamed tocomponent
- Bumped the minimum IDOM version to 0.38.0
websocket
parameter for components has been removed. Functionally, it is replaced withdjango_idom.hooks.use_websocket
.
0.0.5 - 2022-04-04
- Bumped the minimum IDOM version to 0.37.2
- ModuleNotFoundError: No module named
idom.core.proto
caused by IDOM 0.37.2
0.0.4 - 2022-03-05
- Bumped the minimum IDOM version to 0.37.1
0.0.3 - 2022-02-19
- Bumped the minimum IDOM version to 0.36.3
0.0.2 - 2022-01-30
- Ability to declare the HTML class of the top-level component
div
name = ...
parameter to IDOM HTTP paths for use withdjango.urls.reverse()
- Cache versioning to automatically invalidate old web module files from the cache back-end
- Automatic pre-population of the IDOM component registry
- Type hinting for
IdomWebsocket
- Fetching web modules from disk and/or cache is now fully async
- Static files are now contained within a
django_idom/
parent folder - Upgraded IDOM to version
0.36.0
- Minimum Django version required is now
4.0
- Minimum Python version required is now
3.8
IDOM_WEB_MODULES_PATH
has been replaced with Djangoinclude(...)
IDOM_WS_MAX_RECONNECT_DELAY
has been renamed toIDOM_WS_MAX_RECONNECT_TIMEOUT
idom_web_modules
cache back-end has been renamed toidom
- Increase test timeout values to prevent false positives
- Windows compatibility for building Django-IDOM
- Fixed potential directory traversal attack on the IDOM web modules URL
0.0.1 - 2021-08-18
- Support for IDOM within the Django