Skip to content
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

Form template is missing {{form.media}} #26

Open
petasis opened this issue Jan 11, 2024 · 1 comment
Open

Form template is missing {{form.media}} #26

petasis opened this issue Jan 11, 2024 · 1 comment

Comments

@petasis
Copy link

petasis commented Jan 11, 2024

Hi all,

If you use a form, which has a custom field widget, and this widget has additional JS/CSS files, these files are not included in the HTML source.

I modified slightly templates/dashboards/components/form/form.html like this:

{% load dashboards %}
{% block dashboards_form_media %}
<!-- form media dashboards_form_media -->
{{ rendered_value.form.media }}
{% endblock dashboards_form_media %}
{% spaceless %}

It seems to work after the change.

@OmegaDroid
Copy link
Contributor

Good spot, could you open a PR with the fix please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants