Skip to main content

No project description provided

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:

  • 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

Demo is available at https://django-smart-admin.herokuapp.com/. (Any user/password combination is accepted)

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_urls', # optional

   'smart_admin.apps.SmartLogsConfig',  # optional:  log application
   'smart_admin.apps.SmartTemplateConfig',  # templates
   'smart_admin.apps.SmartAuthConfig', # optional: django.contrib.auth enhancements
   'smart_admin',
   .....
]
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

import adminactions.actions as actions
from django.contrib.admin import site

admin.autodiscover()
actions.add_to_site(site)

urlpatterns = [
    ....
    path('adminactions/', include('adminactions.urls')),
]

Configuration

from smart_admin.utils import match, regex

SMART_ADMIN_SECTIONS = {
    "Security": [
        "auth",
    ],
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-smart-admin-1.1.0.tar.gz (14.2 kB view details)

Uploaded Source

File details

Details for the file django-smart-admin-1.1.0.tar.gz.

File metadata

  • Download URL: django-smart-admin-1.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 importlib_metadata/4.3.0 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.8

File hashes

Hashes for django-smart-admin-1.1.0.tar.gz
Algorithm Hash digest
SHA256 02f5a43777873feb59f56f13502e08361b9300f907d9026ecadff596b592b73c
MD5 f42dd62406726d4cb5e8f476b8ec2bf1
BLAKE2b-256 07a56e7abb4509a41063ef9fe2132a94705ff3b8f1ee4658fe8bf6a55a5711f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page