Skip to main content

No project description provided

Project description

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 copy/paste 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)

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

Components

ModelAdmin Mixins

  • 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_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')),
]

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.8.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

django_smart_admin-1.8.0-py2-none-any.whl (31.5 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: django-smart-admin-1.8.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.8

File hashes

Hashes for django-smart-admin-1.8.0.tar.gz
Algorithm Hash digest
SHA256 62025a5748037fed75585a277fe9d93eb9bee4e4badc95884822d7e6cc8f2454
MD5 029a1914d0990ae94f006ea9ea3f345e
BLAKE2b-256 5443f08f820d926321eb722edef2e1d7f11451ab2e885e37bd1e7d20a3cc455f

See more details on using hashes here.

File details

Details for the file django_smart_admin-1.8.0-py2-none-any.whl.

File metadata

  • Download URL: django_smart_admin-1.8.0-py2-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.8

File hashes

Hashes for django_smart_admin-1.8.0-py2-none-any.whl
Algorithm Hash digest
SHA256 b4bc39bb2ac05268bd0832a147fc11bb830826f8a3d12971d0ccf22e91f84deb
MD5 a1def83895282cc59b5345de136a0a99
BLAKE2b-256 29c6c0a463610bc991c87e6a0068c43356884a3470585925064d6b18a03f76f6

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