diff --git a/dev/reference/testing_api/index.html b/dev/reference/testing_api/index.html index a83c0632..64c60d19 100644 --- a/dev/reference/testing_api/index.html +++ b/dev/reference/testing_api/index.html @@ -113,7 +113,7 @@ margin-top: 0.7rem; }

Testing APIยค

djc_test ยค

djc_test(django_settings: Union[Optional[Dict], Callable, Type] = None, components_settings: Optional[Dict] = None, parametrize: Optional[Union[Tuple[Sequence[str], Sequence[Sequence[Any]]], Tuple[Sequence[str], Sequence[Sequence[Any]], Optional[Union[Iterable[Union[None, str, float, int, bool]], Callable[[Any], Optional[object]]]]]]] = None, gc_collect: bool = True) -> Callable
-

See source code

Decorator for testing components from django-components.

@djc_test manages the global state of django-components, ensuring that each test is properly isolated and that components registered in one test do not affect other tests.

This decorator can be applied to a function, method, or a class. If applied to a class, it will search for all methods that start with test_, and apply the decorator to them. This is applied recursively to nested classes as well.

Examples:

Applying to a function:

from django_components.testing import djc_test
+

See source code

Decorator for testing components from django-components.

@djc_test manages the global state of django-components, ensuring that each test is properly isolated and that components registered in one test do not affect other tests.

This decorator can be applied to a function, method, or a class. If applied to a class, it will search for all methods that start with test_, and apply the decorator to them. This is applied recursively to nested classes as well.

Examples:

Applying to a function:

from django_components.testing import djc_test
 
 @djc_test
 def test_my_component():
diff --git a/dev/releases/index.html b/dev/releases/index.html
index c38a2626..b44aef54 100644
--- a/dev/releases/index.html
+++ b/dev/releases/index.html
@@ -112,4 +112,4 @@
   font-size: 0.63rem;
   margin-top: 0.7rem;
 }
- 
\ No newline at end of file +
\ No newline at end of file diff --git a/dev/releases/v0.100/index.html b/dev/releases/v0.100/index.html index c52c5010..3b0cf873 100644 --- a/dev/releases/v0.100/index.html +++ b/dev/releases/v0.100/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.100 ๐Ÿšจ๐Ÿ“ข (2024-09-11)ยค

__

BREAKING CHANGESยค

Featยค

  • Beside the top-level /components directory, you can now define also app-level components dirs, e.g. [app]/components (See COMPONENTS.app_dirs).

Refactorยค

  • When you call as_view() on a component instance, that instance will be passed to View.as_view()
\ No newline at end of file +

v0.100 ๐Ÿšจ๐Ÿ“ข (2024-09-11)ยค

__

BREAKING CHANGESยค

Featยค

  • Beside the top-level /components directory, you can now define also app-level components dirs, e.g. [app]/components (See COMPONENTS.app_dirs).

Refactorยค

  • When you call as_view() on a component instance, that instance will be passed to View.as_view()
\ No newline at end of file diff --git a/dev/releases/v0.110/index.html b/dev/releases/v0.110/index.html index e5d02472..436e9df8 100644 --- a/dev/releases/v0.110/index.html +++ b/dev/releases/v0.110/index.html @@ -229,4 +229,4 @@ Hello from content slot {% endfill %} {% endcomponent %} -
\ No newline at end of file +
\ No newline at end of file diff --git a/dev/releases/v0.111/index.html b/dev/releases/v0.111/index.html index 7ec06f12..03666391 100644 --- a/dev/releases/v0.111/index.html +++ b/dev/releases/v0.111/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.111ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Prevent rendering Component tags during fill discovery stage to fix a case when a component inside the default slot tried to access provided data too early.
\ No newline at end of file +

v0.111ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Prevent rendering Component tags during fill discovery stage to fix a case when a component inside the default slot tried to access provided data too early.
\ No newline at end of file diff --git a/dev/releases/v0.112/index.html b/dev/releases/v0.112/index.html index b21dd3c6..93a97f91 100644 --- a/dev/releases/v0.112/index.html +++ b/dev/releases/v0.112/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.112ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Allow components to accept default fill even if no default slot was encountered during rendering
\ No newline at end of file +

v0.112ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Allow components to accept default fill even if no default slot was encountered during rendering
\ No newline at end of file diff --git a/dev/releases/v0.113/index.html b/dev/releases/v0.113/index.html index 2b31760f..ebb9727a 100644 --- a/dev/releases/v0.113/index.html +++ b/dev/releases/v0.113/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.113ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Ensure consistent order of scripts in Component.Media.js
\ No newline at end of file +

v0.113ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Ensure consistent order of scripts in Component.Media.js
\ No newline at end of file diff --git a/dev/releases/v0.114/index.html b/dev/releases/v0.114/index.html index 89bf5a81..727c6c12 100644 --- a/dev/releases/v0.114/index.html +++ b/dev/releases/v0.114/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.114ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Prevent rendering Slot tags during fill discovery stage to fix a case when a component inside a slot fill tried to access provided data too early.
\ No newline at end of file +

v0.114ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Prevent rendering Slot tags during fill discovery stage to fix a case when a component inside a slot fill tried to access provided data too early.
\ No newline at end of file diff --git a/dev/releases/v0.115/index.html b/dev/releases/v0.115/index.html index a60994e4..8c1a4a68 100644 --- a/dev/releases/v0.115/index.html +++ b/dev/releases/v0.115/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.115ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Fix integration with ManifestStaticFilesStorage on Windows by resolving component filepaths (like Component.template_name) to POSIX paths.
\ No newline at end of file +

v0.115ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.

Fixยค

  • Fix integration with ManifestStaticFilesStorage on Windows by resolving component filepaths (like Component.template_name) to POSIX paths.
\ No newline at end of file diff --git a/dev/releases/v0.116/index.html b/dev/releases/v0.116/index.html index 0ee61be2..a55e0cf0 100644 --- a/dev/releases/v0.116/index.html +++ b/dev/releases/v0.116/index.html @@ -133,4 +133,4 @@ <script src="https://unpkg.com/alpinejs"></script> </body> </html> -

\ No newline at end of file +

\ No newline at end of file diff --git a/dev/releases/v0.117/index.html b/dev/releases/v0.117/index.html index d4158d04..bb7bd951 100644 --- a/dev/releases/v0.117/index.html +++ b/dev/releases/v0.117/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.117ยค

Fixยค

  • The HTML parser no longer erronously inserts <html><head><body> on some occasions, and no longer tries to close unclosed HTML tags.

Refactorยค

\ No newline at end of file +

v0.117ยค

Fixยค

  • The HTML parser no longer erronously inserts <html><head><body> on some occasions, and no longer tries to close unclosed HTML tags.

Refactorยค

\ No newline at end of file diff --git a/dev/releases/v0.118/index.html b/dev/releases/v0.118/index.html index d06aed95..6fb65111 100644 --- a/dev/releases/v0.118/index.html +++ b/dev/releases/v0.118/index.html @@ -118,4 +118,4 @@ def my_view(request) request=request ) ``` -
\ No newline at end of file +
\ No newline at end of file diff --git a/dev/releases/v0.119/index.html b/dev/releases/v0.119/index.html index 044dea07..f18bea61 100644 --- a/dev/releases/v0.119/index.html +++ b/dev/releases/v0.119/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.119ยค

โš ๏ธ Attention โš ๏ธ - This release introduced bugs #849, #855. Please update to v0.121.

Fixยค

Refactorยค

\ No newline at end of file +

v0.119ยค

โš ๏ธ Attention โš ๏ธ - This release introduced bugs #849, #855. Please update to v0.121.

Fixยค

Refactorยค

\ No newline at end of file diff --git a/dev/releases/v0.120/index.html b/dev/releases/v0.120/index.html index bec0c431..fbadd4a5 100644 --- a/dev/releases/v0.120/index.html +++ b/dev/releases/v0.120/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.120ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.121 to fix bugs introduced in v0.119.

Fixยค

  • Fix the use of translation strings _("bla") as inputs to components #849.
\ No newline at end of file +

v0.120ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.121 to fix bugs introduced in v0.119.

Fixยค

  • Fix the use of translation strings _("bla") as inputs to components #849.
\ No newline at end of file diff --git a/dev/releases/v0.121/index.html b/dev/releases/v0.121/index.html index 9afec4f4..f544a832 100644 --- a/dev/releases/v0.121/index.html +++ b/dev/releases/v0.121/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.121ยค

Fixยค

  • Fix the use of Django template filters (|lower:"etc") with component inputs #855.
\ No newline at end of file +

v0.121ยค

Fixยค

  • Fix the use of Django template filters (|lower:"etc") with component inputs #855.
\ No newline at end of file diff --git a/dev/releases/v0.122/index.html b/dev/releases/v0.122/index.html index 9fd7da92..ba103d9d 100644 --- a/dev/releases/v0.122/index.html +++ b/dev/releases/v0.122/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -
\ No newline at end of file +
\ No newline at end of file diff --git a/dev/releases/v0.123/index.html b/dev/releases/v0.123/index.html index cb8b89a6..a19677fb 100644 --- a/dev/releases/v0.123/index.html +++ b/dev/releases/v0.123/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.123ยค

Fixยค

  • Fix edge cases around rendering components whose templates used the {% extends %} template tag (#859)
\ No newline at end of file +

v0.123ยค

Fixยค

  • Fix edge cases around rendering components whose templates used the {% extends %} template tag (#859)
\ No newline at end of file diff --git a/dev/releases/v0.124/index.html b/dev/releases/v0.124/index.html index 0be2806a..05d81817 100644 --- a/dev/releases/v0.124/index.html +++ b/dev/releases/v0.124/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.124ยค

Featยค

  • Instead of inlining the JS and CSS under Component.js and Component.css, you can move them to their own files, and link the JS/CSS files with Component.js_file and Component.css_file.

    Even when you specify the JS/CSS with Component.js_file or Component.css_file, then you can still access the content under Component.js or Component.css - behind the scenes, the content of the JS/CSS files will be set to Component.js / Component.css upon first access.

    The same applies to Component.template_file, which will populate Component.template upon first access.

    With this change, the role of Component.js/css and the JS/CSS in Component.Media has changed:

    • The JS/CSS defined in Component.js/css or Component.js/css_file is the "main" JS/CSS
    • The JS/CSS defined in Component.Media.js/css are secondary or additional

    See the updated "Getting Started" tutorial

Refactorยค

  • The canonical way to define a template file was changed from template_name to template_file, to align with the rest of the API.

    template_name remains for backwards compatibility. When you get / set template_name, internally this is proxied to template_file.

  • The undocumented Component.component_id was removed. Instead, use Component.id. Changes:

    • While component_id was unique every time you instantiated Component, the new id is unique every time you render the component (e.g. with Component.render())
    • The new id is available only during render, so e.g. from within get_context_data()
  • Component's HTML / CSS / JS are now resolved and loaded lazily. That is, if you specify template_name/template_file, js_file, css_file, or Media.js/css, the file paths will be resolved only once you:

    1. Try to access component's HTML / CSS / JS, or
    2. Render the component.

    Read more on Accessing component's HTML / JS / CSS.

  • Component inheritance:

    • When you subclass a component, the JS and CSS defined on parent's Media class is now inherited by the child component.
    • You can disable or customize Media inheritance by setting extend attribute on the Component.Media nested class. This work similarly to Django's Media.extend.
    • When child component defines either template or template_file, both of parent's template and template_file are ignored. The same applies to js_file and css_file.
  • Autodiscovery now ignores files and directories that start with an underscore (_), except __init__.py

  • The Signals emitted by or during the use of django-components are now documented, together the template_rendered signal.

\ No newline at end of file +

v0.124ยค

Featยค

  • Instead of inlining the JS and CSS under Component.js and Component.css, you can move them to their own files, and link the JS/CSS files with Component.js_file and Component.css_file.

    Even when you specify the JS/CSS with Component.js_file or Component.css_file, then you can still access the content under Component.js or Component.css - behind the scenes, the content of the JS/CSS files will be set to Component.js / Component.css upon first access.

    The same applies to Component.template_file, which will populate Component.template upon first access.

    With this change, the role of Component.js/css and the JS/CSS in Component.Media has changed:

    • The JS/CSS defined in Component.js/css or Component.js/css_file is the "main" JS/CSS
    • The JS/CSS defined in Component.Media.js/css are secondary or additional

    See the updated "Getting Started" tutorial

Refactorยค

  • The canonical way to define a template file was changed from template_name to template_file, to align with the rest of the API.

    template_name remains for backwards compatibility. When you get / set template_name, internally this is proxied to template_file.

  • The undocumented Component.component_id was removed. Instead, use Component.id. Changes:

    • While component_id was unique every time you instantiated Component, the new id is unique every time you render the component (e.g. with Component.render())
    • The new id is available only during render, so e.g. from within get_context_data()
  • Component's HTML / CSS / JS are now resolved and loaded lazily. That is, if you specify template_name/template_file, js_file, css_file, or Media.js/css, the file paths will be resolved only once you:

    1. Try to access component's HTML / CSS / JS, or
    2. Render the component.

    Read more on Accessing component's HTML / JS / CSS.

  • Component inheritance:

    • When you subclass a component, the JS and CSS defined on parent's Media class is now inherited by the child component.
    • You can disable or customize Media inheritance by setting extend attribute on the Component.Media nested class. This work similarly to Django's Media.extend.
    • When child component defines either template or template_file, both of parent's template and template_file are ignored. The same applies to js_file and css_file.
  • Autodiscovery now ignores files and directories that start with an underscore (_), except __init__.py

  • The Signals emitted by or during the use of django-components are now documented, together the template_rendered signal.

\ No newline at end of file diff --git a/dev/releases/v0.125/index.html b/dev/releases/v0.125/index.html index 4acf59d5..86c3cc4c 100644 --- a/dev/releases/v0.125/index.html +++ b/dev/releases/v0.125/index.html @@ -118,4 +118,4 @@ return { "data_id": kwargs["data-id"], } -
\ No newline at end of file +
\ No newline at end of file diff --git a/dev/releases/v0.126/index.html b/dev/releases/v0.126/index.html index 486bba93..07575eed 100644 --- a/dev/releases/v0.126/index.html +++ b/dev/releases/v0.126/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.126ยค

Refactorยค

  • Replaced BeautifulSoup4 with a custom HTML parser.
  • The heuristic for inserting JS and CSS dependenies into the default place has changed.
    • JS is still inserted at the end of the <body>, and CSS at the end of <head>.
    • However, we find end of <body> by searching for last occurrence of </body>
    • And for the end of <head> we search for the first occurrence of </head>
\ No newline at end of file +

v0.126ยค

Refactorยค

  • Replaced BeautifulSoup4 with a custom HTML parser.
  • The heuristic for inserting JS and CSS dependenies into the default place has changed.
    • JS is still inserted at the end of the <body>, and CSS at the end of <head>.
    • However, we find end of <body> by searching for last occurrence of </body>
    • And for the end of <head> we search for the first occurrence of </head>
\ No newline at end of file diff --git a/dev/releases/v0.127/index.html b/dev/releases/v0.127/index.html index 44e39e8e..fd1f881b 100644 --- a/dev/releases/v0.127/index.html +++ b/dev/releases/v0.127/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.127ยค

Fixยค

  • Fix component rendering when using {% cache %} with remote cache and multiple web servers (#930)
\ No newline at end of file +

v0.127ยค

Fixยค

  • Fix component rendering when using {% cache %} with remote cache and multiple web servers (#930)
\ No newline at end of file diff --git a/dev/releases/v0.128/index.html b/dev/releases/v0.128/index.html index 38c59eba..a0e990e0 100644 --- a/dev/releases/v0.128/index.html +++ b/dev/releases/v0.128/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.128ยค

Featยค

Refactorยค

  • Removed use of eval for node validation (#944)

Perfยค

  • Components can now be infinitely nested. (#936)

  • Component input validation is now 6-7x faster on CPython and PyPy. This previously made up 10-30% of the total render time. (#945)

\ No newline at end of file +

v0.128ยค

Featยค

Refactorยค

  • Removed use of eval for node validation (#944)

Perfยค

  • Components can now be infinitely nested. (#936)

  • Component input validation is now 6-7x faster on CPython and PyPy. This previously made up 10-30% of the total render time. (#945)

\ No newline at end of file diff --git a/dev/releases/v0.129/index.html b/dev/releases/v0.129/index.html index c4bace24..b05a4067 100644 --- a/dev/releases/v0.129/index.html +++ b/dev/releases/v0.129/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.129ยค

Fixยค

  • Fix thread unsafe media resolve validation by moving it to ComponentMedia __post_init (#977
  • Fix bug: Relative path in extends and include does not work when using template_file (#976
  • Fix error when template cache setting (template_cache_size) is set to 0 (#974
\ No newline at end of file +

v0.129ยค

Fixยค

  • Fix thread unsafe media resolve validation by moving it to ComponentMedia __post_init (#977
  • Fix bug: Relative path in extends and include does not work when using template_file (#976
  • Fix error when template cache setting (template_cache_size) is set to 0 (#974
\ No newline at end of file diff --git a/dev/releases/v0.130/index.html b/dev/releases/v0.130/index.html index ce40dffa..4539bf27 100644 --- a/dev/releases/v0.130/index.html +++ b/dev/releases/v0.130/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.130ยค

Featยค

  • Access the HttpRequest object under Component.request.

    To pass the request object to a component, either: - Render a template or component with RequestContext, - Or set the request kwarg to Component.render() or Component.render_to_response().

    Read more on HttpRequest.

  • Access the context processors data under Component.context_processors_data.

    Context processors data is available only when the component has access to the request object, either by: - Passing the request to Component.render() or Component.render_to_response(), - Or by rendering a template or component with RequestContext, - Or being nested in another component that has access to the request object.

    The data from context processors is automatically available within the component's template.

    Read more on HttpRequest.

\ No newline at end of file +

v0.130ยค

Featยค

  • Access the HttpRequest object under Component.request.

    To pass the request object to a component, either: - Render a template or component with RequestContext, - Or set the request kwarg to Component.render() or Component.render_to_response().

    Read more on HttpRequest.

  • Access the context processors data under Component.context_processors_data.

    Context processors data is available only when the component has access to the request object, either by: - Passing the request to Component.render() or Component.render_to_response(), - Or by rendering a template or component with RequestContext, - Or being nested in another component that has access to the request object.

    The data from context processors is automatically available within the component's template.

    Read more on HttpRequest.

\ No newline at end of file diff --git a/dev/releases/v0.131/index.html b/dev/releases/v0.131/index.html index b0ff5f2f..208abb08 100644 --- a/dev/releases/v0.131/index.html +++ b/dev/releases/v0.131/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.131ยค

Featยค

  • Support for extensions (plugins) for django-components!

    • Hook into lifecycle events of django-components
    • Pre-/post-process component inputs, outputs, and templates
    • Add extra methods or attributes to Components
    • Add custom extension-specific CLI commands
    • Add custom extension-specific URL routes

    Read more on Extensions.

  • New CLI commands:

    • components list - List all components
    • components create <name> - Create a new component (supersedes startcomponent)
    • components upgrade - Upgrade a component (supersedes upgradecomponent)
    • components ext list - List all extensions
    • components ext run <extension> <command> - Run a command added by an extension
  • @djc_test decorator for writing tests that involve Components.

    • The decorator manages global state, ensuring that tests don't leak.
    • If using pytest, the decorator allows you to parametrize Django or Components settings.
    • The decorator also serves as a stand-in for Django's @override_settings.

    See the API reference for @djc_test for more details.

  • ComponentRegistry now has a has() method to check if a component is registered without raising an error.

  • Get all created Component classes with all_components().

  • Get all created ComponentRegistry instances with all_registries().

Refactorยค

  • The startcomponent and upgradecomponent commands are deprecated, and will be removed in v1.

    Instead, use components create <name> and components upgrade.

Internalยค

  • Settings are now loaded only once, and thus are considered immutable once loaded. Previously, django-components would load settings from settings.COMPONENTS on each access. The new behavior aligns with Django's settings.
\ No newline at end of file +

v0.131ยค

Featยค

  • Support for extensions (plugins) for django-components!

    • Hook into lifecycle events of django-components
    • Pre-/post-process component inputs, outputs, and templates
    • Add extra methods or attributes to Components
    • Add custom extension-specific CLI commands
    • Add custom extension-specific URL routes

    Read more on Extensions.

  • New CLI commands:

    • components list - List all components
    • components create <name> - Create a new component (supersedes startcomponent)
    • components upgrade - Upgrade a component (supersedes upgradecomponent)
    • components ext list - List all extensions
    • components ext run <extension> <command> - Run a command added by an extension
  • @djc_test decorator for writing tests that involve Components.

    • The decorator manages global state, ensuring that tests don't leak.
    • If using pytest, the decorator allows you to parametrize Django or Components settings.
    • The decorator also serves as a stand-in for Django's @override_settings.

    See the API reference for @djc_test for more details.

  • ComponentRegistry now has a has() method to check if a component is registered without raising an error.

  • Get all created Component classes with all_components().

  • Get all created ComponentRegistry instances with all_registries().

Refactorยค

  • The startcomponent and upgradecomponent commands are deprecated, and will be removed in v1.

    Instead, use components create <name> and components upgrade.

Internalยค

  • Settings are now loaded only once, and thus are considered immutable once loaded. Previously, django-components would load settings from settings.COMPONENTS on each access. The new behavior aligns with Django's settings.
\ No newline at end of file diff --git a/dev/releases/v0.132/index.html b/dev/releases/v0.132/index.html index 900163ea..b32ee736 100644 --- a/dev/releases/v0.132/index.html +++ b/dev/releases/v0.132/index.html @@ -116,4 +116,4 @@ class Media: js = ["*.js"] css = ["*.css"] -

Fixยค

\ No newline at end of file +

Fixยค

\ No newline at end of file diff --git a/dev/releases/v0.133/index.html b/dev/releases/v0.133/index.html index 559d23e6..baf3fdfc 100644 --- a/dev/releases/v0.133/index.html +++ b/dev/releases/v0.133/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.133ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.134 to fix bugs introduced in v0.132.

Fixยค

  • HOTFIX: Fix the use of URLs in Component.Media.js and Component.Media.css
\ No newline at end of file +

v0.133ยค

โš ๏ธ Attention โš ๏ธ - Please update to v0.134 to fix bugs introduced in v0.132.

Fixยค

  • HOTFIX: Fix the use of URLs in Component.Media.js and Component.Media.css
\ No newline at end of file diff --git a/dev/releases/v0.134/index.html b/dev/releases/v0.134/index.html index 3b7f0d86..7702af59 100644 --- a/dev/releases/v0.134/index.html +++ b/dev/releases/v0.134/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.134ยค

Fixยค

  • HOTFIX: Fix the use of URLs in Component.Media.js and Component.Media.css
\ No newline at end of file +

v0.134ยค

Fixยค

  • HOTFIX: Fix the use of URLs in Component.Media.js and Component.Media.css
\ No newline at end of file diff --git a/dev/releases/v0.135/index.html b/dev/releases/v0.135/index.html index a7f0b570..6220709b 100644 --- a/dev/releases/v0.135/index.html +++ b/dev/releases/v0.135/index.html @@ -148,4 +148,4 @@ style={"background-color": "green", "color": None, "width": False} style="position: absolute; height: 12px;" %} -

Read more on HTML attributes.

Fixยค

\ No newline at end of file +

Read more on HTML attributes.

Fixยค

\ No newline at end of file diff --git a/dev/releases/v0.136/index.html b/dev/releases/v0.136/index.html index b2038d82..c6639ab2 100644 --- a/dev/releases/v0.136/index.html +++ b/dev/releases/v0.136/index.html @@ -118,4 +118,4 @@ "djc_pydantic.PydanticExtension", ], } -

Fixยค

\ No newline at end of file +

Fixยค

\ No newline at end of file diff --git a/dev/releases/v0.137/index.html b/dev/releases/v0.137/index.html index c2e8e00b..745462b4 100644 --- a/dev/releases/v0.137/index.html +++ b/dev/releases/v0.137/index.html @@ -139,4 +139,4 @@ class View: def get(self, request): return self.render_to_response() -

In v1, these methods should be defined only on the Component.View class instead.

Refactorยค

\ No newline at end of file +

In v1, these methods should be defined only on the Component.View class instead.

Refactorยค

\ No newline at end of file diff --git a/dev/releases/v0.138/index.html b/dev/releases/v0.138/index.html index d9204482..43c21a9d 100644 --- a/dev/releases/v0.138/index.html +++ b/dev/releases/v0.138/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.138ยค

Fixยค

  • Fix bug: Allow components with Url.public = True to be defined before django.setup()
\ No newline at end of file +

v0.138ยค

Fixยค

  • Fix bug: Allow components with Url.public = True to be defined before django.setup()
\ No newline at end of file diff --git a/dev/releases/v0.139.0/index.html b/dev/releases/v0.139.0/index.html index ad483e48..df945568 100644 --- a/dev/releases/v0.139.0/index.html +++ b/dev/releases/v0.139.0/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

v0.139.0ยค

Fixยค

  • Fix bug: Fix compatibility with Finder.find() in Django 5.2 (#1119)
\ No newline at end of file +

v0.139.0ยค

Fixยค

  • Fix bug: Fix compatibility with Finder.find() in Django 5.2 (#1119)
\ No newline at end of file diff --git a/dev/releases/v0.139.1/index.html b/dev/releases/v0.139.1/index.html index e2c6bc89..bc7a4b0f 100644 --- a/dev/releases/v0.139.1/index.html +++ b/dev/releases/v0.139.1/index.html @@ -118,4 +118,4 @@ Component[Args, Kwargs, Slots, Data] Component[Args, Kwargs, Slots, Data, JsData] Component[Args, Kwargs, Slots, Data, JsData, CssData] -

All omitted parameters will default to Any.

  • Added typing_extensions to the project as a dependency

  • Multiple extensions with the same name (case-insensitive) now raise an error

  • Extension names (case-insensitive) also MUST NOT conflict with existing Component class API.

    So if you name an extension render, it will conflict with the render() method of the Component class, and thus raise an error.

  • \ No newline at end of file +

    All omitted parameters will default to Any.

  • Added typing_extensions to the project as a dependency

  • Multiple extensions with the same name (case-insensitive) now raise an error

  • Extension names (case-insensitive) also MUST NOT conflict with existing Component class API.

    So if you name an extension render, it will conflict with the render() method of the Component class, and thus raise an error.

  • \ No newline at end of file diff --git a/dev/releases/v0.140.0/index.html b/dev/releases/v0.140.0/index.html index 2db33ac8..47a977fb 100644 --- a/dev/releases/v0.140.0/index.html +++ b/dev/releases/v0.140.0/index.html @@ -608,4 +608,4 @@ component_id: str result: Optional[str] error: Optional[Exception] -

    Fixยค

    \ No newline at end of file +

    Fixยค

    \ No newline at end of file diff --git a/dev/releases/v0.140.1/index.html b/dev/releases/v0.140.1/index.html index ff405f43..2c76bf18 100644 --- a/dev/releases/v0.140.1/index.html +++ b/dev/releases/v0.140.1/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/dev/releases/v0.141.0/index.html b/dev/releases/v0.141.0/index.html index d4573ad7..c0689363 100644 --- a/dev/releases/v0.141.0/index.html +++ b/dev/releases/v0.141.0/index.html @@ -121,4 +121,4 @@ def on_css_loaded(self, ctx: OnCssLoadedContext) -> Optional[str]: return ctx.content + "/* Hello! */" -

    See all Extension hooks.

    Fixยค

    Refactorยค

    \ No newline at end of file +

    See all Extension hooks.

    Fixยค

    Refactorยค

    \ No newline at end of file diff --git a/dev/releases/v0.141.1/index.html b/dev/releases/v0.141.1/index.html index 54dd8d81..154a4238 100644 --- a/dev/releases/v0.141.1/index.html +++ b/dev/releases/v0.141.1/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.141.1ยค

    Fixยค

    • Components' JS and CSS scripts (e.g. from Component.js or Component.js_file) are now cached at class creation time.

      This means that when you now restart the server while having a page opened in the browser, the JS / CSS files are immediately available.

      Previously, the JS/CSS were cached only after the components were rendered. So you had to reload the page to trigger the rendering, in order to make the JS/CSS files available.

    • Fix the default cache for JS / CSS scripts to be unbounded.

      Previously, the default cache for the JS/CSS scripts (LocMemCache) was accidentally limited to 300 entries (~150 components).

    • Do not send template_rendered signal when rendering a component with no template. (#1277)

    \ No newline at end of file +

    v0.141.1ยค

    Fixยค

    • Components' JS and CSS scripts (e.g. from Component.js or Component.js_file) are now cached at class creation time.

      This means that when you now restart the server while having a page opened in the browser, the JS / CSS files are immediately available.

      Previously, the JS/CSS were cached only after the components were rendered. So you had to reload the page to trigger the rendering, in order to make the JS/CSS files available.

    • Fix the default cache for JS / CSS scripts to be unbounded.

      Previously, the default cache for the JS/CSS scripts (LocMemCache) was accidentally limited to 300 entries (~150 components).

    • Do not send template_rendered signal when rendering a component with no template. (#1277)

    \ No newline at end of file diff --git a/dev/releases/v0.141.2/index.html b/dev/releases/v0.141.2/index.html index 7b31e840..491bc410 100644 --- a/dev/releases/v0.141.2/index.html +++ b/dev/releases/v0.141.2/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.141.2ยค

    Fixยค

    • Fix bug where JS and CSS were missing when {% component %} tag was inside {% include %} tag (#1296)
    \ No newline at end of file +

    v0.141.2ยค

    Fixยค

    • Fix bug where JS and CSS were missing when {% component %} tag was inside {% include %} tag (#1296)
    \ No newline at end of file diff --git a/dev/releases/v0.141.3/index.html b/dev/releases/v0.141.3/index.html index d3d049b0..a3945bb5 100644 --- a/dev/releases/v0.141.3/index.html +++ b/dev/releases/v0.141.3/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.141.3ยค

    Featยค

    • You no longer need to render the whole page with the document strategy to use HTML fragments.

      Previously, if you wanted to insert rendered components as HTML fragments, you had to ensure that the HTML document it was being inserted into was rendered with the document strategy.

      Now, when you render components with fragment strategy, they know how to fetch their own JS / CSS dependencies.

    Fixยค

    • Fix compatibility with django-template-partials (#1322)
    \ No newline at end of file +

    v0.141.3ยค

    Featยค

    • You no longer need to render the whole page with the document strategy to use HTML fragments.

      Previously, if you wanted to insert rendered components as HTML fragments, you had to ensure that the HTML document it was being inserted into was rendered with the document strategy.

      Now, when you render components with fragment strategy, they know how to fetch their own JS / CSS dependencies.

    Fixยค

    • Fix compatibility with django-template-partials (#1322)
    \ No newline at end of file diff --git a/dev/releases/v0.141.4/index.html b/dev/releases/v0.141.4/index.html index b9f64f22..6f481aaa 100644 --- a/dev/releases/v0.141.4/index.html +++ b/dev/releases/v0.141.4/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/dev/releases/v0.17/index.html b/dev/releases/v0.17/index.html index 07ee57cb..7a00cf26 100644 --- a/dev/releases/v0.17/index.html +++ b/dev/releases/v0.17/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.17 (2021-09-10)ยค

    __

    BREAKING CHANGESยค

    • Renamed Component.context and Component.template to get_context_data and get_template_name. The old methods still work, but emit a deprecation warning.

      This change was done to sync naming with Django's class based views, and make using django-components more familiar to Django users. Component.context and Component.template will be removed when version 1.0 is released.

    \ No newline at end of file +

    v0.17 (2021-09-10)ยค

    __

    BREAKING CHANGESยค

    • Renamed Component.context and Component.template to get_context_data and get_template_name. The old methods still work, but emit a deprecation warning.

      This change was done to sync naming with Django's class based views, and make using django-components more familiar to Django users. Component.context and Component.template will be removed when version 1.0 is released.

    \ No newline at end of file diff --git a/dev/releases/v0.22/index.html b/dev/releases/v0.22/index.html index 737f7a3d..d7258ec7 100644 --- a/dev/releases/v0.22/index.html +++ b/dev/releases/v0.22/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.22 (2022-07-26)ยค

    __

    Featยค

    • All files inside components subdirectores are autoimported to simplify setup.

      An existing project might start to get AlreadyRegistered errors because of this. To solve this, either remove your custom loading of components, or set "autodiscover": False in settings.COMPONENTS.

    \ No newline at end of file +

    v0.22 (2022-07-26)ยค

    __

    Featยค

    • All files inside components subdirectores are autoimported to simplify setup.

      An existing project might start to get AlreadyRegistered errors because of this. To solve this, either remove your custom loading of components, or set "autodiscover": False in settings.COMPONENTS.

    \ No newline at end of file diff --git a/dev/releases/v0.26/index.html b/dev/releases/v0.26/index.html index 9ebf9f13..952ccd45 100644 --- a/dev/releases/v0.26/index.html +++ b/dev/releases/v0.26/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.26 ๐Ÿšจ๐Ÿ“ข (2023-03-14)ยค

    __

    BREAKING CHANGESยค

    • Changed the syntax for {% slot %} tags. From now on, we separate defining a slot ({% slot %}) from filling a slot with content ({% fill %}). This means you will likely need to change a lot of slot tags to fill.

      We understand this is annoying, but it's the only way we can get support for nested slots that fill in other slots, which is a very nice feature to have access to. Hoping that this will feel worth it!

    \ No newline at end of file +

    v0.26 ๐Ÿšจ๐Ÿ“ข (2023-03-14)ยค

    __

    BREAKING CHANGESยค

    • Changed the syntax for {% slot %} tags. From now on, we separate defining a slot ({% slot %}) from filling a slot with content ({% fill %}). This means you will likely need to change a lot of slot tags to fill.

      We understand this is annoying, but it's the only way we can get support for nested slots that fill in other slots, which is a very nice feature to have access to. Hoping that this will feel worth it!

    \ No newline at end of file diff --git a/dev/releases/v0.27/index.html b/dev/releases/v0.27/index.html index 9c4ab939..de6f6e63 100644 --- a/dev/releases/v0.27/index.html +++ b/dev/releases/v0.27/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.27 (2023-04-11)ยค

    __

    Featยค

    • A second installable app django_components.safer_staticfiles. It provides the same behavior as django.contrib.staticfiles but with extra security guarantees (more info below in Security Notes).
    \ No newline at end of file +

    v0.27 (2023-04-11)ยค

    __

    Featยค

    • A second installable app django_components.safer_staticfiles. It provides the same behavior as django.contrib.staticfiles but with extra security guarantees (more info below in Security Notes).
    \ No newline at end of file diff --git a/dev/releases/v0.28/index.html b/dev/releases/v0.28/index.html index c2389d2a..b9a93fa9 100644 --- a/dev/releases/v0.28/index.html +++ b/dev/releases/v0.28/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.28 (2023-05-18)ยค

    __

    Featยค

    • 'implicit' slot filling and the default option for slot tags.
    \ No newline at end of file +

    v0.28 (2023-05-18)ยค

    __

    Featยค

    • 'implicit' slot filling and the default option for slot tags.
    \ No newline at end of file diff --git a/dev/releases/v0.34/index.html b/dev/releases/v0.34/index.html index 6a7f2963..d8ab1189 100644 --- a/dev/releases/v0.34/index.html +++ b/dev/releases/v0.34/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.34 (2024-01-27)ยค

    __

    Featยค

    • Components as views, which allows you to handle requests and render responses from within a component. See the documentation for more details.
    \ No newline at end of file +

    v0.34 (2024-01-27)ยค

    __

    Featยค

    • Components as views, which allows you to handle requests and render responses from within a component. See the documentation for more details.
    \ No newline at end of file diff --git a/dev/releases/v0.50/index.html b/dev/releases/v0.50/index.html index 4e2c70fe..44db5eb0 100644 --- a/dev/releases/v0.50/index.html +++ b/dev/releases/v0.50/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.50 ๐Ÿšจ๐Ÿ“ข (2024-02-26)ยค

    __

    BREAKING CHANGESยค

    • {% component_block %} is now {% component %}, and {% component %} blocks need an ending {% endcomponent %} tag.

      The new python manage.py upgradecomponent command can be used to upgrade a directory (use --path argument to point to each dir) of templates that use components to the new syntax automatically.

      This change is done to simplify the API in anticipation of a 1.0 release of django_components. After 1.0 we intend to be stricter with big changes like this in point releases.

    \ No newline at end of file +

    v0.50 ๐Ÿšจ๐Ÿ“ข (2024-02-26)ยค

    __

    BREAKING CHANGESยค

    • {% component_block %} is now {% component %}, and {% component %} blocks need an ending {% endcomponent %} tag.

      The new python manage.py upgradecomponent command can be used to upgrade a directory (use --path argument to point to each dir) of templates that use components to the new syntax automatically.

      This change is done to simplify the API in anticipation of a 1.0 release of django_components. After 1.0 we intend to be stricter with big changes like this in point releases.

    \ No newline at end of file diff --git a/dev/releases/v0.67/index.html b/dev/releases/v0.67/index.html index 13123485..5b9c553f 100644 --- a/dev/releases/v0.67/index.html +++ b/dev/releases/v0.67/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.67 (2024-04-17)ยค

    __

    Refactorยค

    • Changed the default way how context variables are resolved in slots. See the documentation for more details.
    \ No newline at end of file +

    v0.67 (2024-04-17)ยค

    __

    Refactorยค

    • Changed the default way how context variables are resolved in slots. See the documentation for more details.
    \ No newline at end of file diff --git a/dev/releases/v0.70/index.html b/dev/releases/v0.70/index.html index a15687b1..040f1d4e 100644 --- a/dev/releases/v0.70/index.html +++ b/dev/releases/v0.70/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.70 ๐Ÿšจ๐Ÿ“ข (2024-05-01)ยค

    __

    BREAKING CHANGESยค

    • {% if_filled "my_slot" %} tags were replaced with {{ component_vars.is_filled.my_slot }} variables.

    • Simplified settings - slot_context_behavior and context_behavior were merged. See the documentation for more details.

    \ No newline at end of file +

    v0.70 ๐Ÿšจ๐Ÿ“ข (2024-05-01)ยค

    __

    BREAKING CHANGESยค

    • {% if_filled "my_slot" %} tags were replaced with {{ component_vars.is_filled.my_slot }} variables.

    • Simplified settings - slot_context_behavior and context_behavior were merged. See the documentation for more details.

    \ No newline at end of file diff --git a/dev/releases/v0.74/index.html b/dev/releases/v0.74/index.html index e42fa09e..63527977 100644 --- a/dev/releases/v0.74/index.html +++ b/dev/releases/v0.74/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.74 (2024-05-12)ยค

    __

    Featยค

    • {% html_attrs %} tag for formatting data as HTML attributes

    • prefix:key=val construct for passing dicts to components

    \ No newline at end of file +

    v0.74 (2024-05-12)ยค

    __

    Featยค

    • {% html_attrs %} tag for formatting data as HTML attributes

    • prefix:key=val construct for passing dicts to components

    \ No newline at end of file diff --git a/dev/releases/v0.77/index.html b/dev/releases/v0.77/index.html index 61f0240d..a2de173f 100644 --- a/dev/releases/v0.77/index.html +++ b/dev/releases/v0.77/index.html @@ -118,4 +118,4 @@

    to

    {% fill "my_slot" default="alias" %}
         {{ alias }}
     {% endfill %}
    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/dev/releases/v0.79/index.html b/dev/releases/v0.79/index.html index 835f0fc7..5884c0cf 100644 --- a/dev/releases/v0.79/index.html +++ b/dev/releases/v0.79/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.79 ๐Ÿšจ๐Ÿ“ข (2024-06-01)ยค

    __

    BREAKING CHANGESยค

    • Default value for the COMPONENTS.context_behavior setting was changes from "isolated" to "django". If you did not set this value explicitly before, this may be a breaking change. See the rationale for change here.
    \ No newline at end of file +

    v0.79 ๐Ÿšจ๐Ÿ“ข (2024-06-01)ยค

    __

    BREAKING CHANGESยค

    • Default value for the COMPONENTS.context_behavior setting was changes from "isolated" to "django". If you did not set this value explicitly before, this may be a breaking change. See the rationale for change here.
    \ No newline at end of file diff --git a/dev/releases/v0.80/index.html b/dev/releases/v0.80/index.html index 7597fe19..98ecb016 100644 --- a/dev/releases/v0.80/index.html +++ b/dev/releases/v0.80/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.80 (2024-06-01)ยค

    __

    Featยค

    • Vue-like provide/inject with the {% provide %} tag and inject() method.
    \ No newline at end of file +

    v0.80 (2024-06-01)ยค

    __

    Featยค

    • Vue-like provide/inject with the {% provide %} tag and inject() method.
    \ No newline at end of file diff --git a/dev/releases/v0.81/index.html b/dev/releases/v0.81/index.html index b0fbd11c..3f591414 100644 --- a/dev/releases/v0.81/index.html +++ b/dev/releases/v0.81/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.81 ๐Ÿšจ๐Ÿ“ข (2024-06-12)ยค

    __

    BREAKING CHANGESยค

    • The order of arguments to render_to_response has changed, to align with the (now public) render method of Component class.

    Featยค

    • Component.render() is public and documented

    • Slots passed render_to_response and render can now be rendered also as functions.

    \ No newline at end of file +

    v0.81 ๐Ÿšจ๐Ÿ“ข (2024-06-12)ยค

    __

    BREAKING CHANGESยค

    • The order of arguments to render_to_response has changed, to align with the (now public) render method of Component class.

    Featยค

    • Component.render() is public and documented

    • Slots passed render_to_response and render can now be rendered also as functions.

    \ No newline at end of file diff --git a/dev/releases/v0.85/index.html b/dev/releases/v0.85/index.html index 266dc4b7..185b89ed 100644 --- a/dev/releases/v0.85/index.html +++ b/dev/releases/v0.85/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.85 ๐Ÿšจ๐Ÿ“ข (2024-07-29)ยค

    __

    BREAKING CHANGESยค

    • Autodiscovery module resolution changed. Following undocumented behavior was removed:

      • Previously, autodiscovery also imported any [app]/components.py files, and used SETTINGS_MODULE to search for component dirs.

        To migrate from:

        • [app]/components.py - Define each module in COMPONENTS.libraries setting, or import each module inside the AppConfig.ready() hook in respective apps.py files.

        • SETTINGS_MODULE - Define component dirs using STATICFILES_DIRS

      • Previously, autodiscovery handled relative files in STATICFILES_DIRS. To align with Django, STATICFILES_DIRS now must be full paths (Django docs).

    \ No newline at end of file +

    v0.85 ๐Ÿšจ๐Ÿ“ข (2024-07-29)ยค

    __

    BREAKING CHANGESยค

    • Autodiscovery module resolution changed. Following undocumented behavior was removed:

      • Previously, autodiscovery also imported any [app]/components.py files, and used SETTINGS_MODULE to search for component dirs.

        To migrate from:

        • [app]/components.py - Define each module in COMPONENTS.libraries setting, or import each module inside the AppConfig.ready() hook in respective apps.py files.

        • SETTINGS_MODULE - Define component dirs using STATICFILES_DIRS

      • Previously, autodiscovery handled relative files in STATICFILES_DIRS. To align with Django, STATICFILES_DIRS now must be full paths (Django docs).

    \ No newline at end of file diff --git a/dev/releases/v0.90/index.html b/dev/releases/v0.90/index.html index d0052558..e4b03fad 100644 --- a/dev/releases/v0.90/index.html +++ b/dev/releases/v0.90/index.html @@ -123,4 +123,4 @@

    While django_components.component_shorthand_formatter allows you to write components like so:

    {% button href="..." disabled %}
         Click me!
     {% endbutton %}
    -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/dev/releases/v0.92/index.html b/dev/releases/v0.92/index.html index d2eb478f..20df14fb 100644 --- a/dev/releases/v0.92/index.html +++ b/dev/releases/v0.92/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.92 ๐Ÿšจ๐Ÿ“ข (2024-08-22)ยค

    __

    BREAKING CHANGESยค

    • Component class is no longer a subclass of View. To configure the View class, set the Component.View nested class. HTTP methods like get or post can still be defined directly on Component class, and Component.as_view() internally calls Component.View.as_view(). (See Modifying the View class)

    Featยค

    • The inputs (args, kwargs, slots, context, ...) that you pass to Component.render() can be accessed from within get_context_data, get_template and get_template_name via self.input. (See Accessing data passed to the component)

    • Typing: Component class supports generics that specify types for Component.render (See Adding type hints with Generics)

    \ No newline at end of file +

    v0.92 ๐Ÿšจ๐Ÿ“ข (2024-08-22)ยค

    __

    BREAKING CHANGESยค

    • Component class is no longer a subclass of View. To configure the View class, set the Component.View nested class. HTTP methods like get or post can still be defined directly on Component class, and Component.as_view() internally calls Component.View.as_view(). (See Modifying the View class)

    Featยค

    • The inputs (args, kwargs, slots, context, ...) that you pass to Component.render() can be accessed from within get_context_data, get_template and get_template_name via self.input. (See Accessing data passed to the component)

    • Typing: Component class supports generics that specify types for Component.render (See Adding type hints with Generics)

    \ No newline at end of file diff --git a/dev/releases/v0.93/index.html b/dev/releases/v0.93/index.html index 79e69763..41cb9a48 100644 --- a/dev/releases/v0.93/index.html +++ b/dev/releases/v0.93/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.93 (2024-08-27)ยค

    __

    Featยค

    • Spread operator ...dict inside template tags. (See Spread operator)

    • Use template tags inside string literals in component inputs. (See Use template tags inside component inputs)

    • Dynamic slots, fills and provides - The name argument for these can now be a variable, a template expression, or via spread operator

    • Component library authors can now configure CONTEXT_BEHAVIOR and TAG_FORMATTER settings independently from user settings.

    \ No newline at end of file +

    v0.93 (2024-08-27)ยค

    __

    Featยค

    • Spread operator ...dict inside template tags. (See Spread operator)

    • Use template tags inside string literals in component inputs. (See Use template tags inside component inputs)

    • Dynamic slots, fills and provides - The name argument for these can now be a variable, a template expression, or via spread operator

    • Component library authors can now configure CONTEXT_BEHAVIOR and TAG_FORMATTER settings independently from user settings.

    \ No newline at end of file diff --git a/dev/releases/v0.94/index.html b/dev/releases/v0.94/index.html index 2f9001de..6fcd2100 100644 --- a/dev/releases/v0.94/index.html +++ b/dev/releases/v0.94/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/dev/releases/v0.95/index.html b/dev/releases/v0.95/index.html index 4f90e309..d7b77a1c 100644 --- a/dev/releases/v0.95/index.html +++ b/dev/releases/v0.95/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.95 (2024-08-29)ยค

    __

    Featยค

    • Added support for dynamic components, where the component name is passed as a variable. (See Dynamic components)

    Refactorยค

    • Changed Component.input to raise RuntimeError if accessed outside of render context. Previously it returned None if unset.
    \ No newline at end of file +

    v0.95 (2024-08-29)ยค

    __

    Featยค

    • Added support for dynamic components, where the component name is passed as a variable. (See Dynamic components)

    Refactorยค

    • Changed Component.input to raise RuntimeError if accessed outside of render context. Previously it returned None if unset.
    \ No newline at end of file diff --git a/dev/releases/v0.96/index.html b/dev/releases/v0.96/index.html index 5c4c4fe1..62d24749 100644 --- a/dev/releases/v0.96/index.html +++ b/dev/releases/v0.96/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.96 (2024-09-04)ยค

    __

    Featยค

    • Run-time type validation for Python >=3.11 - If the Component class is typed, e.g. Component[Args, Kwargs, ...], the args, kwargs, slots, and data are validated against the given types. (See Runtime input validation with types)

    • Render hooks - Set on_render_before and on_render_after methods on Component to intercept or modify the template or context before rendering, or the rendered result afterwards. (See Component hooks)

    • component_vars.is_filled context variable can be accessed from within on_render_before and on_render_after hooks as self.is_filled.my_slot

    \ No newline at end of file +

    v0.96 (2024-09-04)ยค

    __

    Featยค

    • Run-time type validation for Python >=3.11 - If the Component class is typed, e.g. Component[Args, Kwargs, ...], the args, kwargs, slots, and data are validated against the given types. (See Runtime input validation with types)

    • Render hooks - Set on_render_before and on_render_after methods on Component to intercept or modify the template or context before rendering, or the rendered result afterwards. (See Component hooks)

    • component_vars.is_filled context variable can be accessed from within on_render_before and on_render_after hooks as self.is_filled.my_slot

    \ No newline at end of file diff --git a/dev/releases/v0.97/index.html b/dev/releases/v0.97/index.html index 4756d128..d6644cd1 100644 --- a/dev/releases/v0.97/index.html +++ b/dev/releases/v0.97/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.97 (2024-09-06)ยค

    __

    Fixยค

    • Fixed template caching. You can now also manually create cached templates with cached_template()

    Refactorยค

    • The previously undocumented get_template was made private.

    • In it's place, there's a new get_template, which supersedes get_template_string (will be removed in v1). The new get_template is the same as get_template_string, except it allows to return either a string or a Template instance.

    • You now must use only one of template, get_template, template_name, or get_template_name.

    \ No newline at end of file +

    v0.97 (2024-09-06)ยค

    __

    Fixยค

    • Fixed template caching. You can now also manually create cached templates with cached_template()

    Refactorยค

    • The previously undocumented get_template was made private.

    • In it's place, there's a new get_template, which supersedes get_template_string (will be removed in v1). The new get_template is the same as get_template_string, except it allows to return either a string or a Template instance.

    • You now must use only one of template, get_template, template_name, or get_template_name.

    \ No newline at end of file diff --git a/versions.json b/versions.json index 8b0be05c..1a31e458 100644 --- a/versions.json +++ b/versions.json @@ -1,7 +1,7 @@ [ { "version": "dev", - "title": "dev (c5354ba)", + "title": "dev (fd2b012)", "aliases": [] }, {