1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #35330 -- Fixed the update of related widgets when the referenced model is camel case named.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
This commit is contained in:
devin13cox
2024-04-02 18:00:25 -07:00
committed by GitHub
parent 888b9042b3
commit 8665cf03d7
6 changed files with 86 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
{% load i18n static %}
<div class="related-widget-wrapper" {% if not model_has_limit_choices_to %}data-model-ref="{{ model }}"{% endif %}>
<div class="related-widget-wrapper" {% if not model_has_limit_choices_to %}data-model-ref="{{ model_name }}"{% endif %}>
{{ rendered_widget }}
{% block links %}
{% spaceless %}

View File

@@ -329,6 +329,7 @@ class RelatedFieldWidgetWrapper(forms.Widget):
"name": name,
"url_params": url_params,
"model": rel_opts.verbose_name,
"model_name": rel_opts.model_name,
"can_add_related": self.can_add_related,
"can_change_related": self.can_change_related,
"can_delete_related": self.can_delete_related,