Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Question about usage of VersionedAdmin & Django complaining about "missing" template datetimefilter.html #158

Open
jeromecc opened this issue Nov 5, 2018 · 1 comment

Comments

@jeromecc
Copy link

jeromecc commented Nov 5, 2018

Hello dear developers & users of cleanerversion!

I am not sure I understand how to use VersionedAdmin properly.

I did this on my Django 2.0 app:

# myapp/admin.py
from versions.admin import VersionedAdmin
#...
class MyModelAdmin(VersionedAdmin):
    pass
#...

admin.site.register(MyModel, MyModelAdmin)

Then Django complained of missing template versions/datetimefilter.html

I copied it from GitHub to my templates folder and now it works. But am I supposed to do this this way? Shouldn't Django be able to find this template in the installed module?
My knowledge of Django doesn't allow me to claim this is a bug so let's say this is a question about how to use VersionedAdmin properly.

Thank you for your insights!

@maennel
Copy link
Contributor

maennel commented Dec 6, 2018

Hi @jeromecc
One thing that I can think of, is that the versions module doesn't figure in the INSTALLED_APPS list and Django wasn't able to retrieve template files (https://docs.djangoproject.com/en/2.0/ref/settings/#templates). CleanerVersion documentation has been updated with #159 now.

Does that resolve the issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants