Skip to content

Create and update #15

@SaarWolf

Description

@SaarWolf

When creating a new entry with TomSelectModelChoiceField and TomSelectModelMultipleChoiceField I need the possibility for calling the complete form for the entries. My idea is something like

<div class="input-group">
<select name="{{ widget.name }}"
        id="{% if 'id' in widget.attrs.keys and widget.attrs.id %}{{ widget.attrs.id }}{% else %}{{ widget.name }}{% endif %}"
        {% include "django/forms/widgets/attrs.html" with widget=widget %}
        aria-label="{% translate 'Select option' %}"
        aria-expanded="false"
        role="combobox">
</select>
        <a class="btn btn-outline-info" type="button" Htmx call update view ><i class="bi bi-pencil-square"></i></a>
        <a class="btn btn-outline-info" type="button" Htmx call widget.view_create_url><i class="bi bi-plus-square"></i></a>
</div>

I found the widget.view_create_url but where can I find the update url and the id of the selected entry?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions