mirror of
https://github.com/django/django.git
synced 2025-03-06 07:22:32 +00:00
Used model's Options.model_name instead of object_name.lower().
Follow up to 20d487c27b40bb70496ddc7419011ca78b7d4940.
This commit is contained in:
parent
0eaad0bb59
commit
2190096f50
@ -32,7 +32,7 @@ class InclusionAdminNode(InclusionNode):
|
||||
def render(self, context):
|
||||
opts = context["opts"]
|
||||
app_label = opts.app_label.lower()
|
||||
object_name = opts.object_name.lower()
|
||||
object_name = opts.model_name
|
||||
# Load template for this render call. (Setting self.filename isn't
|
||||
# thread-safe.)
|
||||
context.render_context[self] = context.template.engine.select_template(
|
||||
|
@ -202,7 +202,7 @@ class ForeignKeyRawIdWidget(forms.TextInput):
|
||||
% (
|
||||
self.admin_site.name,
|
||||
obj._meta.app_label,
|
||||
obj._meta.object_name.lower(),
|
||||
obj._meta.model_name,
|
||||
),
|
||||
args=(obj.pk,),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user