﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28074	Document template-based widget rendering ramifications for contrib.gis	Tobi	Tim Graham	"After upgrading from 1.10.7 to 1.11, `OSMGeoAdmin` with custom `map_template` throws a `TemplateDoesNotExist` error.

Consider an OSMGeoAdmin and a simple view:

{{{
class FieldAdmin(OSMGeoAdmin):
    map_template = 'gis/admin/hello_world.html'

def test_view(request):
    return render(request, 'gis/admin/hello_world.html', {})
}}}


The template is in `project_dir/templates/gis/admin/hello_world.html`, and the relevant settings are pretty default:
{{{
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates'),],
        'APP_DIRS': True,
        'OPTIONS': {
            ...
        },
    },
]
}}}


The `test_view` finds the template and renders fine, while the `FieldAdmin` cannot find the template. Interestingly, the filesystemloader is being used, but searches a completely wrong directory (ie definitely not my BASE_DIR):

{{{
django.template.loaders.filesystem.Loader: /home/ubuntu/env/lib/python3.5/site-packages/django/forms/templates/gis/admin/hello_world.html (Source does not exist)
}}}

Downgrading to 1.10.7 solves this issue."	Cleanup/optimization	closed	Documentation	1.11	Normal	fixed	geodjango, templates		Accepted	1	0	0	0	0	0
