Opened 10 years ago

Closed 10 years ago

#21460 closed Bug (fixed)

Bug in cache template loader

Reported by: Pablo Martín Owned by: Pablo Martín
Component: Template system Version: dev
Severity: Release blocker Keywords:
Cc: unai@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In this commit [5154c9f92caa38bd5893320ed72fbc7305233822#diff-aed42ee20a44c4ff4f09eb2b8a6ae870R31] was introduced the next error.

We have the next template loaders in our settings, e.g.:

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
#     'django.template.loaders.eggs.Loader',
)

TEMPLATE_LOADERS = (('django.template.loaders.cached.Loader', (TEMPLATE_LOADERS)),)

And e.g. we have overwritten in our proyect templates, the template admin/change_form.html, the find_template method of the cache template loader will return the template admin/change_form.html of django.contrib.admin instead of the template of our project.

Change History (7)

comment:1 by Pablo Martín, 10 years ago

Has patch: set

comment:2 by Claude Paroz, 10 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

FWIW, doesn't affect 1.6 branch.

comment:3 by Unai Zalakain, 10 years ago

Cc: unai@… added

comment:4 by Pablo Martín, 10 years ago

I added tests :-)

comment:5 by Unai Zalakain, 10 years ago

Needs tests: unset
Triage Stage: AcceptedReady for checkin

comment:6 by Pablo Martín, 10 years ago

Thanks you Unai

comment:7 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 3ac823fc5b88db7808f4d1cbca122713c6c9e03a:

Fixed #21460 -- Reenabled proper template precedence in find_template

Refs #20806. Thanks Unai Zalakain for the review.

Note: See TracTickets for help on using tickets.
Back to Top