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 django-relatedadminwidget

  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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_relatedadminwidget-0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file django_relatedadminwidget-0.1-py3-none-any.whl.

File metadata

  • Download URL: django_relatedadminwidget-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for django_relatedadminwidget-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae7a3e55e75cfd1888d07d9a06a4cf92a7cf7262f4045573f5709d449013f681
MD5 17f692a92e9527d3a8fa2154bd460e3b
BLAKE2b-256 be95d90d77fdb0a601192662db084a2469eac896a7d9f7b2707ec4c2eaf7d26d

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