django.template.exceptions.TemplateDoesNotExist: admin/solo/change_form.html
Vayel opened this issue · 8 comments
Hi!
When I go to my singleton model's admin change page, I get the exception django.template.exceptions.TemplateDoesNotExist: admin/solo/change_form.html
. I'm working with Django 3.1.1.
The problem is that the egg file of the package is a zip file and not a directory (the extraction did not happen). But Django's default template loader can find templates in directories only: https://github.com/django/django/blob/0b8871ab6744285943784795ede053839ee009ef/django/template/utils.py#L94
To force the unzip, you need to set the zip-safe
option to False
: https://setuptools.readthedocs.io/en/latest/formats.html#zip-safe-and-not-zip-safe. You can do so in the setup.py
file:
# ...
setup(
# ...
zip_safe=False,
)
Thanks!
Hi, is there some news? I've the same issue
I'm using django==3.0.5
As a temporary solution I've copied the template file from github inside the folder admin/solo
of my template directory to ovverride it
I'm using Python 3.8 (inside a docker container) and pip for installing, but still have this issue.
I had the problem inside a docker container as well.
Had the same issue, fixed it by adding "solo" to installed apps in settings