Don't register historical tables in admin interface

This commit is contained in:
Tanner Collin 2020-02-13 02:16:21 +00:00
parent c45a671cff
commit 095fec4681

View File

@ -5,6 +5,9 @@ from simple_history.admin import SimpleHistoryAdmin
app_models = apps.get_app_config('api').get_models()
for model in app_models:
if model._meta.model_name.startswith('historical'):
continue
try:
admin.site.register(model, SimpleHistoryAdmin)
except AlreadyRegistered: