Use auditlog for ServiceInstance objects
All checks were successful
Tests / test (push) Successful in 25s
All checks were successful
Tests / test (push) Successful in 25s
This commit is contained in:
parent
7cc0e76895
commit
6545f32e39
2 changed files with 6 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import re
|
|||
import kubernetes
|
||||
import rules
|
||||
import urlman
|
||||
from auditlog.registry import auditlog
|
||||
from django.conf import settings
|
||||
from django.core.cache import cache
|
||||
from django.core.exceptions import ValidationError
|
||||
|
|
@ -921,3 +922,6 @@ class ServiceInstance(ServalaModelMixin, models.Model):
|
|||
return {"error": str(e)}
|
||||
except Exception as e:
|
||||
return {"error": str(e)}
|
||||
|
||||
|
||||
auditlog.register(ServiceInstance, exclude_fields=["updated_at"], serialize_data=True)
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ INSTALLED_APPS = [
|
|||
"allauth.account",
|
||||
"allauth.socialaccount",
|
||||
"allauth.socialaccount.providers.openid_connect",
|
||||
"auditlog",
|
||||
"servala.core",
|
||||
]
|
||||
|
||||
|
|
@ -170,6 +171,7 @@ MIDDLEWARE = [
|
|||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
"allauth.account.middleware.AccountMiddleware",
|
||||
"django.contrib.auth.middleware.LoginRequiredMiddleware",
|
||||
"auditlog.middleware.AuditlogMiddleware",
|
||||
"servala.core.middleware.OrganizationMiddleware",
|
||||
]
|
||||
LOGIN_URL = "account_login"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue