Skip to main content

Simple app that

Project description

# django-admin-enhancer

## Overview

A simple django app that provides change and deletion links to FK fields in the admin while ticket [#13163](https://code.djangoproject.com/ticket/13163) and [#13165](https://code.djangoproject.com/ticket/13165) are not fixed.

Note that this apps works with django >= 1.4 only.

## Display

![selected](https://dl.dropbox.com/u/2759157/selected.png)

![selected](https://dl.dropbox.com/u/2759157/empty.png)

[Video displaying interaction with the widget](https://www.youtube.com/watch?v=H4xqku-BPBU)

## Usage First, add ‘admin_enhancer’ to your INSTALLED_APPS to avoid getting TemplateDoesNotExist errors.

Make sure to mix EnhancedModelAdminMixin when dealing with django.contrib.admin.ModelAdmin subclasses and EnhancedAdminMixin when dealing with django.contrib.admin.InlineModelAdmin at both ends of the relationship. The mixins are located at admin_enhancer.admin.

If edition and deletion controls appears but the popup is not closed nor is the select box updated your ModelAdmin subclass referenced by the field in question is probably not mixed with EnhancedModelAdminMixin.

For some examples take a look [here](https://github.com/charettes/django-admin-enhancer/blob/master/tests/test_app/admin.py).

## Django CMS support

Django CMS (https://www.django-cms.org/) defines a plugin system to create pluggable applications; its plugin system relies on standard Django admin framework so it’s easy to enhance plugins using this project.

### Plugin enhancement

To add admin_enhancer support to your own plugins just add admin_enhancer.EnhancedAdminMixin to plugin class definition:

...
from admin_enhancer.admin import EnhancedAdminMixin

class MyOwnPlugin(EnhancedAdminMixin, CMSPluginBase):
    name = "whatever"

    ...
plugin_pool.register_plugin(MyOwnPlugin)

To enhance third party plugins, unregister original plugin and extend it with your own base class:

...
from other.app.cms_plugins import ThirdPartyPlugin
from admin_enhancer.admin import EnhancedAdminMixin

class EnhancedThirPartyPlugin(EnhancedAdminMixin, ThirdPartyPlugin):
    pass

    ...
plugin_pool.unregister_plugin(ThirdPartyPlugin)
plugin_pool.register_plugin(EnhancedThirPartyPlugin)

### Page admin support

Django CMS defines a ModelAdmin for its Page object; admin_enhancer.contrib.djangocms defines a new ModelAdmin for Page to enhance it. To install it add admin_enhancer.contrib.djangocms to INSTALLED_APPS, after any django-cms or django-admin-enhancer-related application.

## Django Filer support

django-filer (https://github.com/stefanfoulis/django-filer) has its own enhanced widget which conflicts with django-admin-enhancer; to enhance filer-based applications, use enhance_exclude attribute on your ModelAdmin to exclude filer-based fields from enhancement while allowing other fields to be enriched.

cmsplugin_filer (https://github.com/stefanfoulis/cmsplugin-filer) can be extended to support django-admin-enhancer like any other django CMS plugin; for better support admin_enhancer.contrib.filer defines a new ModelAdmin for ThumbnailOption class. To install it add admin_enhancer.contrib.filer to INSTALLED_APPS, before admin_enhancer.contrib.djangocms.

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-admin-enhancer-0.1.3.tar.gz (10.2 kB view details)

Uploaded Source

File details

Details for the file django-admin-enhancer-0.1.3.tar.gz.

File metadata

File hashes

Hashes for django-admin-enhancer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8fc8edec99cd66f47a5de5e5ea62daa73dba74230204cd802d0bcaf9fa2ca0bd
MD5 e6e0516f50a42b8d5098385dd8ce1a37
BLAKE2b-256 2587fe9336fbf24e19ed39ced9a71c570a73205f0617f8472fd10a6608b4ea5a

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