-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
742a htmx for name select choice field #1004
742a htmx for name select choice field #1004
Conversation
this will be triggered by a change in the primary target select choice field
…rge-namesdatasets' into 742a-htmx-for-name-select-choice-field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tried to run this I got an attribute error:
AttributeError: 'WSGIRequest' object has no attribute 'htmx'
here is the traceback:
File "/home/sglasberg/dev/TOM_explore/env/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/sglasberg/dev/TOM_explore/env/lib/python3.11/site-packages/django/core/handlers/base.py", line 199, in _get_response
response = self.process_exception_by_middleware(e, request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sglasberg/dev/TOM_explore/env/lib/python3.11/site-packages/django/core/handlers/base.py", line 362, in process_exception_by_middleware
response = middleware_method(request, exception)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sglasberg/dev/tom_base/tom_common/middleware.py", line 29, in process_exception
raise exception
File "/home/sglasberg/dev/TOM_explore/env/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sglasberg/dev/TOM_explore/env/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sglasberg/dev/TOM_explore/env/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch
return handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sglasberg/dev/tom_base/tom_targets/views.py", line 641, in get
if request.htmx:
^^^^^^^^^^^^
AttributeError: 'WSGIRequest' object has no attribute 'htmx'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add django_htmx
to pyproject.toml
so that we install this dependency
Could you also please update settings.tmpl
with the required intalled app and middleware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good
…rge-namesdatasets' into 742a-htmx-for-name-select-choice-field
a915385
into
742-manually-link-two-targets-as-the-same-target-and-merge-namesdatasets
This PR removes the Submit button and make changing the target name_select ChoiceField update the target fields table: