From 8e79b74635b662b5af5822003891d583e21ada9b Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 6 Sep 2024 06:25:47 +0000 Subject: [PATCH] Deployed 589e802 to dev with MkDocs 1.6.1 and mike 2.1.3 --- dev/CHANGELOG/index.html | 2 +- dev/index.html | 4 +- dev/sitemap.xml | 78 +++++++++++++++++++-------------------- dev/sitemap.xml.gz | Bin 516 -> 516 bytes versions.json | 2 +- 5 files changed, 43 insertions(+), 43 deletions(-) diff --git a/dev/CHANGELOG/index.html b/dev/CHANGELOG/index.html index 53cb1a3b..996ef58b 100644 --- a/dev/CHANGELOG/index.html +++ b/dev/CHANGELOG/index.html @@ -23,7 +23,7 @@ While `django_components.shorthand_component_formatter` al ]

If you are on an older version of django-components, your alternatives are a) passing --ignore <pattern> options to the collecstatic CLI command, or b) defining a subclass of StaticFilesConfig. Both routes are described in the official docs of the staticfiles app.

Note that safer_staticfiles excludes the .py and .html files for collectstatic command:

python manage.py collectstatic
 

but it is ignored on the development server:

python manage.py runserver
-

For a step-by-step guide on deploying production server with static files, see the demo project.

Optional

To avoid loading the app in each template using {% load component_tags %}, you can add the tag as a 'builtin' in settings.py

TEMPLATES = [
+

For a step-by-step guide on deploying production server with static files, see the demo project.

Optional

To avoid loading the app in each template using {% load component_tags %}, you can add the tag as a 'builtin' in settings.py

TEMPLATES = [
     {
         ...,
         'OPTIONS': {
diff --git a/dev/index.html b/dev/index.html
index 4e969fbb..204817ff 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -1,6 +1,6 @@
  Index - Django-Components     
Skip to content

django-componentsΒ€

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

Docs (Work in progress)

Create simple reusable template components in Django

FeaturesΒ€

  • ✨ Reusable components: Create components that can be reused in different parts of your project, or even in different projects.
  • πŸ“ Single file components: Keep your Python, CSS, Javascript and HTML in one place (if you wish)
  • 🎰 Slots: Define slots in your components to make them more flexible.
  • πŸ’» CLI: A command line interface to help you create new components.
  • πŸš€ Wide compatibility: Works with modern and LTS versions of Django.
  • Load assets: Automatically load the right CSS and Javascript files for your components, with our middleware.

SummaryΒ€

It lets you create "template components", that contains both the template, the Javascript and the CSS needed to generate the front end code you need for a modern app. Use components like this:

{% component "calendar" date="2015-06-19" %}{% endcomponent %}
 

And this is what gets rendered (plus the CSS and Javascript you've specified):

<div class="calendar-component">Today's date is <span>2015-06-19</span></div>
-

See the example project or read on to learn about the details!

Table of ContentsΒ€

Release notesΒ€

Version 0.96 - 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

Version 0.95 - Added support for dynamic components, where the component name is passed as a variable. (See Dynamic components) - Changed Component.input to raise RuntimeError if accessed outside of render context. Previously it returned None if unset.

Version 0.94 - django_components now automatically configures Django to support multi-line tags. (See Multi-line tags) - New setting reload_on_template_change. Set this to True to reload the dev server on changes to component template files. (See Reload dev server on component file changes)

Version 0.93 - 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.

πŸš¨πŸ“’ Version 0.92 - BREAKING CHANGE: 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)

  • The inputs (args, kwargs, slots, context, ...) that you pass to Component.render() can be accessed from within get_context_data, get_template_string 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)

Version 0.90 - All tags (component, slot, fill, ...) now support "self-closing" or "inline" form, where you can omit the closing tag:

{# Before #}
+

See the example project or read on to learn about the details!

Table of ContentsΒ€

Release notesΒ€

Version 0.96 - 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

Version 0.95 - Added support for dynamic components, where the component name is passed as a variable. (See Dynamic components) - Changed Component.input to raise RuntimeError if accessed outside of render context. Previously it returned None if unset.

Version 0.94 - django_components now automatically configures Django to support multi-line tags. (See Multi-line tags) - New setting reload_on_template_change. Set this to True to reload the dev server on changes to component template files. (See Reload dev server on component file changes)

Version 0.93 - 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.

πŸš¨πŸ“’ Version 0.92 - BREAKING CHANGE: 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)

  • The inputs (args, kwargs, slots, context, ...) that you pass to Component.render() can be accessed from within get_context_data, get_template_string 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)

Version 0.90 - All tags (component, slot, fill, ...) now support "self-closing" or "inline" form, where you can omit the closing tag:

{# Before #}
 {% component "button" %}{% endcomponent %}
 {# After #}
 {% component "button" / %}
@@ -25,7 +25,7 @@ While `django_components.shorthand_component_formatter` al
 ]
 

If you are on an older version of django-components, your alternatives are a) passing --ignore <pattern> options to the collecstatic CLI command, or b) defining a subclass of StaticFilesConfig. Both routes are described in the official docs of the staticfiles app.

Note that safer_staticfiles excludes the .py and .html files for collectstatic command:

python manage.py collectstatic
 

but it is ignored on the development server:

python manage.py runserver
-

For a step-by-step guide on deploying production server with static files, see the demo project.

InstallationΒ€

  1. Install the app into your environment:

pip install django_components

  1. Then add the app into INSTALLED_APPS in settings.py
INSTALLED_APPS = [
+

For a step-by-step guide on deploying production server with static files, see the demo project.

InstallationΒ€

  1. Install the app into your environment:

pip install django_components

  1. Then add the app into INSTALLED_APPS in settings.py
INSTALLED_APPS = [
    ...,
    'django_components',
 ]
diff --git a/dev/sitemap.xml b/dev/sitemap.xml
index fd7f9cc1..4e87bcd3 100644
--- a/dev/sitemap.xml
+++ b/dev/sitemap.xml
@@ -2,158 +2,158 @@
 
     
          https://emilstenstrom.github.io/django-components/latest/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/CHANGELOG/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/CODE_OF_CONDUCT/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/SUMMARY/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/license/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/slot_rendering/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/slots_and_blocks/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/SUMMARY/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/app_settings/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/apps/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/attributes/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/autodiscover/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/component/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/component_media/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/component_registry/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/components/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/components/dynamic/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/context/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/expression/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/library/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/logger/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/management/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/management/commands/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/management/commands/startcomponent/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/management/commands/upgradecomponent/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/middleware/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/node/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/provide/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/safer_staticfiles/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/safer_staticfiles/apps/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/slots/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/tag_formatter/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/template_loader/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/template_parser/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/templatetags/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/templatetags/component_tags/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/types/
-         2024-09-04
+         2024-09-06
     
     
          https://emilstenstrom.github.io/django-components/latest/reference/django_components/utils/
-         2024-09-04
+         2024-09-06
     
 
\ No newline at end of file
diff --git a/dev/sitemap.xml.gz b/dev/sitemap.xml.gz
index 8fc1a86b93521dc0ea22f471a35a4f59b0fe1b07..36270c27beb46bcccb5174abb5d0199b9530f0f5 100644
GIT binary patch
delta 499
zcmV@y-RK1}+8AcVc{wRY5SnOgXlKRp>2Ca`xT?>lU3LgG
zV&j0bVndX^R@HX9EzuHqov@6#t+3f}1FP50YEoVn_1TC^FL10K%GAZC?p1$~Wx!j9
z1OX{WU$&Mu-Kw;)GQV_ab1%lXrQ$bK##9hMCc-^
z48cHV7aSNEDjkekvCeNC5L$nRHSi~EV1PU9o$Y9%PE2G_>Xa0p{lwc*5V9ClqHI?k
z+ercLh;IkjM7}f#L4K=B<5eDv)#9i#w3a3J(!fz3u-OOgZ6gLe5bUJ5A?#8H>=Pp)
zz|O9+7UOmJZK}q7_--{4d(ydy@>^ZR&6Ws}X>dlmkd^n4v
pPCBDFYThR(5&1pMm9&C=5_3{_#A5%?dUzmE{RefYR&v`K000nr@@@bC

delta 499
zcmVE!&7mhju^30Iz97;~^6y6{
zMH^r{4Lg{+Sdyt%j|@>1J-Oa_H+qANHil{OrL2n)geDpr+G(+Tz8_x}*R!)pmmLC)
z*f`*{*bt?!Rkhu2OSA-DCoE%bD{MC0!0NrTs>`clb~fVD3mj{QGI6n)^(ueJGT^O4
zf`F8xFI!8SZdKY?nO{1zaoj|oVt_zcIZc36O{#wQshURe(ag^4^NVqPHLfq%64T=LPA%@$eDQR%8KC&@z9lfj?OT1KeSsY)2DyVj_c5r=Nkj0=9WxMLw
zP6}{Gd^^A<@})rt@<&w~ukv857Dt_-wJf=p29EN8%|2*v8!_O4U?;^5VV5#spBM=N
zc6ODu7`Jn=ZN-ETuY+#E%ZVW;z}(9%gM!JCbS7zG{BH~CQk%5_aZ6*d#yHsO3_^fI
zG*VDgj&D{BEoy$J*dNI@YwN_MEq`(gN)iwMUWBlcZq+(w&xx&==uY5MZ>C)2!&w}4
p(iz23^FBd|$e(Ghq!sLwn3K9A7W;SB!vle4zX4X3RmIyH008ka^1A>4

diff --git a/versions.json b/versions.json
index eced1605..c6d1be1d 100644
--- a/versions.json
+++ b/versions.json
@@ -1,7 +1,7 @@
 [
   {
     "version": "dev",
-    "title": "dev (8f13a64)",
+    "title": "dev (589e802)",
     "aliases": []
   },
   {