Don't register historical tables in admin interface
This commit is contained in:
parent
c45a671cff
commit
095fec4681
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user