Skip to main content

Get edit and delete links in your django admin. A utility class to let your model admins inherit from.

Project description

Widget for displaying edit and delete links alongside foreign key admin widgets

![Flowers](https://github.com/benjaoming/django-relatedadminwidget/raw/master/screenshot.png)

Also see this project: [django-admin-enhancer](https://github.com/charettes/django-admin-enhancer)

Installation:

  1. pip install git+git://github.com/benjaoming/django-relatedadminwidget.git

  2. Add “relatedwidget” to settings.INSTALLED_APPS

  3. You may want to run your project’s ./manage.py collectstatic

  4. In your applications’ admin.py, let the model admins inherit from RelatedWidgetWrapperBase like in this example:

    from django.contrib import admin from relatedwidget import RelatedWidgetWrapperBase

    class MyModelAdmin(RelatedWidgetWrapperBase, admin.ModelAdmin):

    pass

    admin.site.register(MyModel, MyModelAdmin)

It also works with TabularInline and StackedInline! Remember the order of inheritence, always put RelatedWidgetWrapperBase first!

Troubleshooting

If you get a TemplateDoesNotExist error on ‘relatedwidget/widget.html’, you might have to add django.template.loaders.eggs.Loader to your settings.TEMPLATE_LOADERS.

Credits

User [nasp](http://djangosnippets.org/users/nasp/) did most of the work, I just updated it for Django 1.4 and packed it as an app.

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-relatedadminwidget-0.0.2.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file django-relatedadminwidget-0.0.2.tar.gz.

File metadata

File hashes

Hashes for django-relatedadminwidget-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8fcc1e4a09a479d84eee16f0b8093f683b14ab2bbeca91eebb1d5005a4e2f8ea
MD5 fc92d49acb59e6936c7c5097f6f58b49
BLAKE2b-256 8412ea314c880992b1234067502918f0d1a331e78895a22fba73ce8e4070e401

See more details on using hashes here.

Provenance

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