diff --git a/dev/overview/welcome/index.html b/dev/overview/welcome/index.html index dbf45206..99650faf 100644 --- a/dev/overview/welcome/index.html +++ b/dev/overview/welcome/index.html @@ -112,7 +112,7 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

Welcome to Django Components

django-components

PyPI - Version PyPI - Python Version PyPI - License PyPI - Downloads GitHub Actions Workflow Status asv

django-components combines Django's templating system with the modularity seen in modern frontend frameworks like Vue or React.

With django-components you can support Django projects small and large without leaving the Django ecosystem.

Sponsorsยค

Quickstartยค

A component in django-components can be as simple as a Django template and Python code to declare the component:

components/calendar/calendar.html
<div class="calendar">
+ 

Welcome to Django Components

django-components

PyPI - Version PyPI - Python Version PyPI - License PyPI - Downloads GitHub Actions Workflow Status asv

django-components combines Django's templating system with the modularity seen in modern frontend frameworks like Vue or React.

With django-components you can support Django projects small and large without leaving the Django ecosystem.

Sponsorsยค

Quickstartยค

A component in django-components can be as simple as a Django template and Python code to declare the component:

components/calendar/calendar.html
<div class="calendar">
   Today's date is <span>{{ date }}</span>
 </div>
 
components/calendar/calendar.py
from django_components import Component, register
@@ -391,4 +391,4 @@
 
 {% calendar date="2024-11-06" %}
 {% endcalendar %}
-
\ No newline at end of file +
\ No newline at end of file diff --git a/dev/releases/index.html b/dev/releases/index.html index e6a5259e..17949efe 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 ac872553..02a8cd3b 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 29422f0e..31685e51 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 10ddef86..e935a7ab 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 c8efdfb4..3e539524 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 d136ca44..913e0fe0 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 8f62b5df..f02e588c 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 df2f809a..dcbe9726 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 82a03929..a51b6d05 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 fa59042e..cd6221dc 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 b918c7b2..dfbd8028 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 59798614..690800f4 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 aa276c14..7b009b68 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 e1c62c66..6c9689bf 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 e41b7910..d8c6d033 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 0b94a371..532b94b2 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 f1291cae..febad61a 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 8a7377fe..c0dd7324 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 b97d2bd3..71f658d7 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 df4ab110..d49d517f 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 e17a5c47..9f9d0d99 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 e6489a5e..d20d8f32 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 87ac76fd..bec4b591 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 53828743..fc350a53 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 453e1781..beef6c62 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 431ff9e6..fe619e74 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 137a3e3e..06eb9cd9 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 0a769d57..54b76762 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 9fbe01b4..4f8e8871 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 21afe7d3..97559ec7 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 693a4cc2..b8420864 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 6e7b27e8..ff9d75a3 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 1db47ec7..feff0df6 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 70ad5718..dec3cb75 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 867e8cd6..a08b2cbb 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 29ffb9ec..39e2c121 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 38f7eb10..af69d225 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 71c14d1e..4ea16acd 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 4e64f06d..96afb84a 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 196f83db..4d7ffaa6 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; } -

    v0.141.4ยค

    Fixยค

    • Fix compatibility with Django's {% include %} and {% extends %} tags. See #1325
    \ No newline at end of file +

    v0.141.4ยค

    Fixยค

    • Fix compatibility with Django's {% include %} and {% extends %} tags. See #1325
    \ No newline at end of file diff --git a/dev/releases/v0.141.5/index.html b/dev/releases/v0.141.5/index.html index 38b31966..5adaf2ef 100644 --- a/dev/releases/v0.141.5/index.html +++ b/dev/releases/v0.141.5/index.html @@ -112,4 +112,4 @@ font-size: 0.63rem; margin-top: 0.7rem; } -

    v0.141.5ยค

    Fixยค

    • Tests - Fix bug when using @djc_test decorator and the COMPONENTS settings are set with ComponentsSettings See #1369
    \ No newline at end of file +

    v0.141.5ยค

    Fixยค

    • Tests - Fix bug when using @djc_test decorator and the COMPONENTS settings are set with ComponentsSettings See #1369
    \ No newline at end of file diff --git a/dev/releases/v0.17/index.html b/dev/releases/v0.17/index.html index a67b8f67..2aff58ce 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 ef4e0c65..55612f64 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 752bd34b..ee1a1e48 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 d7e2b314..94bd724d 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 090ee853..bb6dea8f 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 1e851101..d438008c 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 d5e2f34a..9c1f185a 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 21ec177f..1ef16d1e 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 260d6c67..17b3f862 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 90a7ea32..69078bd0 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 81aee473..92599bab 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 93925a8a..91309885 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 c39de911..9f9a7852 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 033ae8c1..ca2335e9 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 59a1b137..430ab417 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 4fd2e5d4..fa93ac23 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 a54b51ce..a6616c4d 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 fe188da4..326bcc3d 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 97408b88..718b8bf1 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 692d2e16..35f792f3 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 85df388e..27eab4d3 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 ce0387f4..fc767502 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 1391a922..bbc9acc4 100644 --- a/versions.json +++ b/versions.json @@ -1,7 +1,7 @@ [ { "version": "dev", - "title": "dev (aa2f48e)", + "title": "dev (9495a55)", "aliases": [] }, {