Collection of small Django Admin utilities that aims to remove some of the common annoying configuration issues
Project description
django-smart-admin
SmartAdmin is a set of small Django Admin utilities that aims to remove some of the common annoying configuration issues:
It is not intended to be a fully replacement of the official Admin, but only offers a set of mixin/utilities the often ( at least for me) need to be copied/pasted in each project.
Bonus
- easily group models by context instead by app
- display admin logentry for any user
- display group members
- display user permissions
- display permission owners
- Display all columns ModelAdmin mixin
- log added/removed permissions for User/Group
- log added/removed groups for User
- ability to set
readonly_fields = ('__all__',)(ReadOnlyMixin) - display all model fields in
changelist(DisplayAllMixin) - automatically creates filter for each indexed field (SmartAutoFilterMixin)
- improved fieldset allows the use of
__others__to include any field not included in others fieldsets (FieldsetMixin) - ability to customise Autocomplete labels
- user defined "site panels"
Components
- LinkedObjectsMixin
- ReadOnlyMixin
- FieldsetMixin
- DisplayAllMixin
Install
pip install django-smart-admin
or (if you want to install extra admin features)
pip install django-smart-admin[full]
In your settings.py
INSTALLED_APPS = [
# "django.contrib.admin", # removes standard django admin
'django_sysinfo', # optional
'adminactions', # optional
'adminfilters', # optional
'admin_extra_buttons', # optional
'smart_admin.apps.SmartTemplateConfig', # templates
'smart_admin', # use this instead of 'django.contrib.admin'
'smart_admin.apps.SmartLogsConfig', # optional: log application
'smart_admin.apps.SmartAuthConfig', # optional: django.contrib.auth enhancements
]
SMART_ADMIN_SECTIONS = {
'Demo': ['demo', ],
'Security': ['auth',
'auth.User',
],
'Logs': ['admin.LogEntry',
],
'Other': [],
'_hidden_': ["sites"]
}
# add some bookmark
SMART_ADMIN_BOOKMARKS = [('GitHub', 'https://github.com/saxix/django-smart-admin')]
# no special permissions to see bookmarks
SMART_ADMIN_BOOKMARKS_PERMISSION = None
# add 'profile' link on the header
SMART_ADMIN_PROFILE_LINK = True
# display all users action log, not only logged user
SMART_ADMIN_ANYUSER_LOG = True
In your urls.py
from django.contrib import admin
from django.urls import include, path
import adminactions.actions as actions
from django.contrib.admin import site
admin.autodiscover()
actions.add_to_site(site)
urlpatterns = [
path('', admin.site.urls),
path('adminactions/', include('adminactions.urls')),
]
Project Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_smart_admin-3.0.tar.gz.
File metadata
- Download URL: django_smart_admin-3.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96094d32f4694a41ed6399d65a693996afb5eda9ad8f9ac9580ca2417d2088e1
|
|
| MD5 |
5b7d9f7cf20a8f2a8a88b80a563a8896
|
|
| BLAKE2b-256 |
54c3f30bb687b280cac27a9890866566c09697ccfb740a35fbeb4c176dc948ac
|
Provenance
The following attestation bundles were made for django_smart_admin-3.0.tar.gz:
Publisher:
release.yml on saxix/django-smart-admin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_smart_admin-3.0.tar.gz -
Subject digest:
96094d32f4694a41ed6399d65a693996afb5eda9ad8f9ac9580ca2417d2088e1 - Sigstore transparency entry: 203785723
- Sigstore integration time:
-
Permalink:
saxix/django-smart-admin@be26b11cd62787eaf73407dc4220ed64bcc7eb56 -
Branch / Tag:
refs/tags/3.0 - Owner: https://github.com/saxix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be26b11cd62787eaf73407dc4220ed64bcc7eb56 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_smart_admin-3.0-py3-none-any.whl.
File metadata
- Download URL: django_smart_admin-3.0-py3-none-any.whl
- Upload date:
- Size: 47.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0605339a7e966a27ee901081cf3b41cf59a1c47f36f6dea29d3b97b82d6bcd6c
|
|
| MD5 |
09f0b6df0609c67bae39795ec492a02f
|
|
| BLAKE2b-256 |
eac9252aea7776f4636579de95ac427943b916efdfb12718550aaecf30e92f32
|
Provenance
The following attestation bundles were made for django_smart_admin-3.0-py3-none-any.whl:
Publisher:
release.yml on saxix/django-smart-admin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_smart_admin-3.0-py3-none-any.whl -
Subject digest:
0605339a7e966a27ee901081cf3b41cf59a1c47f36f6dea29d3b97b82d6bcd6c - Sigstore transparency entry: 203785729
- Sigstore integration time:
-
Permalink:
saxix/django-smart-admin@be26b11cd62787eaf73407dc4220ed64bcc7eb56 -
Branch / Tag:
refs/tags/3.0 - Owner: https://github.com/saxix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be26b11cd62787eaf73407dc4220ed64bcc7eb56 -
Trigger Event:
push
-
Statement type: