cleanerversion icon indicating copy to clipboard operation
cleanerversion copied to clipboard

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

Open jeromecc opened this issue 6 years ago • 1 comments

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!

jeromecc avatar Nov 05 '18 08:11 jeromecc

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?

maennel avatar Dec 06 '18 08:12 maennel