-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable admin interface from settings.py #643
base: master
Are you sure you want to change the base?
Conversation
@@ -57,3 +57,7 @@ def has_delete_permission(self, request, obj=None): | |||
def get_queryset(self, request): | |||
self.request = request | |||
return super().get_queryset(request=request) | |||
|
|||
|
|||
if not settings.AUDITLOG_DISABLE_ADMIN_INTERFACE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change the settings name to AUDITLOG_ENABLE_ADMIN_INTERFACE
with default value of True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! Makes sense
@@ -463,3 +463,10 @@ Django Admin integration | |||
|
|||
When ``auditlog`` is added to your ``INSTALLED_APPS`` setting a customized admin class is active providing an enhanced | |||
Django Admin interface for log entries. | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add .. versionadded:: 3.1.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks @gferrate for this PR. I left some comments. Please add a test and also changelog into https://github.com/jazzband/django-auditlog/blob/master/CHANGELOG.md |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #643 +/- ##
==========================================
+ Coverage 95.21% 95.29% +0.07%
==========================================
Files 31 31
Lines 1025 1042 +17
==========================================
+ Hits 976 993 +17
Misses 49 49 ☔ View full report in Codecov by Sentry. |
Disables admin interface by adding
AUDITLOG_DISABLE_ADMIN_INTERFACE = False
in settings.py