mirror of
https://github.com/django-components/django-components.git
synced 2025-11-19 22:34:22 +00:00
refactor: add missing exports, better error handling, and handle boolean query params (#1422)
Some checks are pending
Docs - build & deploy / docs (push) Waiting to run
Run tests / build (ubuntu-latest, 3.10) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.11) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.12) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.8) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.9) (push) Waiting to run
Run tests / build (windows-latest, 3.10) (push) Waiting to run
Run tests / build (windows-latest, 3.11) (push) Waiting to run
Run tests / build (windows-latest, 3.12) (push) Waiting to run
Run tests / build (windows-latest, 3.13) (push) Waiting to run
Run tests / build (windows-latest, 3.8) (push) Waiting to run
Run tests / build (windows-latest, 3.9) (push) Waiting to run
Run tests / test_docs (3.13) (push) Waiting to run
Run tests / test_sampleproject (3.13) (push) Waiting to run
Some checks are pending
Docs - build & deploy / docs (push) Waiting to run
Run tests / build (ubuntu-latest, 3.10) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.11) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.12) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.13) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.8) (push) Waiting to run
Run tests / build (ubuntu-latest, 3.9) (push) Waiting to run
Run tests / build (windows-latest, 3.10) (push) Waiting to run
Run tests / build (windows-latest, 3.11) (push) Waiting to run
Run tests / build (windows-latest, 3.12) (push) Waiting to run
Run tests / build (windows-latest, 3.13) (push) Waiting to run
Run tests / build (windows-latest, 3.8) (push) Waiting to run
Run tests / build (windows-latest, 3.9) (push) Waiting to run
Run tests / test_docs (3.13) (push) Waiting to run
Run tests / test_sampleproject (3.13) (push) Waiting to run
This commit is contained in:
parent
e9d1b6c4b2
commit
8957befd1a
14 changed files with 552 additions and 371 deletions
|
|
@ -307,6 +307,18 @@ class TestComponentAsView:
|
|||
== f"/components/ext/view/components/{TestComponent.class_id}/?f%27oo=b+ar%26ba%27z#q%20u%22x"
|
||||
)
|
||||
|
||||
# Converts `True` to no flag parameter (no value, e.g. `enabled` instead of `enabled=True`)
|
||||
# And filters out `False` and `None` values
|
||||
component_url3 = get_component_url(
|
||||
TestComponent,
|
||||
query={"f'oo": "b ar&ba'z", "true_key": True, "false_key": False, "none_key": None},
|
||||
fragment='q u"x',
|
||||
)
|
||||
assert (
|
||||
component_url3
|
||||
== f"/components/ext/view/components/{TestComponent.class_id}/?f%27oo=b+ar%26ba%27z&true_key#q%20u%22x"
|
||||
)
|
||||
|
||||
# Merges query params from original URL
|
||||
component_url4 = format_url(
|
||||
"/components/ext/view/components/123?foo=123&bar=456#abc",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue