Skip to main content

Django Model Admin Helpers

Link to repository: https://github.com/Arpaso/django-model-admin-helper

Provides classes to extend default django admin functionality:

  • ButtonableModelAdmin

  • ModelAdminWithForeignKeyLinksMetaclass - adds clickable foreign key links at admin interface in list view; Uses list_display fields to try adding link to the field in list item.

  • AdminURLMixin - provides ability to extend /admin/ urls and make views to urls like: /admin/myurl.

Usage

admin.py:

from admin_helpers import ButtonableModelAdmin, AdminURLMixin, ModelAdminWithForeignKeyLinksMetaclass

class MyModelAdmin(AdminURLMixin, ButtonableModelAdmin):
    __metaclass__ = ModelAdminWithForeignKeyLinksMetaclass

    list_display = ('title', 'link_to_user') # user is a foreignkey field of the MyModel

    def get_urls(self):
        urls = super(MyModelAdmin, self).get_urls()
        my_urls = patterns('',
            (r'^my_view/$', self.my_view)
        )
        return my_urls + urls

    def my_view(self, request):
        # custom view which should return an HttpResponse
        pass

Note: Notice that the custom patterns are included before the regular admin URLs: the admin URL patterns are very permissive and will match nearly anything, so you’ll usually want to prepend your custom URLs to the built-in ones. In this example, my_view will be accessed at /admin/myapp/mymodel/my_view/ (assuming the admin URLs are included at /admin/.)

Written by the development team of Arpaso company: http://arpaso.com

Metadata

Release files for django-model-admin-helper 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-model-admin-helper 0.2.1
File Size Uploaded Provenance Actions
django-model-admin-helper-0.2.1.tar.gz 4.0 kB Without provenance Details for django-model-admin-helper-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-model-admin-helper 0.2.1
File Interpreter ABI Platform Actions
django-model-admin-helper-0.2.1.macosx-10.6-intel.exe Details for django-model-admin-helper-0.2.1.macosx-10.6-intel.exe

Total release size: 71.4 kB

Release files / django-model-admin-helper-0.2.1.tar.gz

Download URL django-model-admin-helper-0.2.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bc3cf1722362aee2e9e67c6c42dcb82c5b60c549eb57a6197f8247eccfd68686
BLAKE2b-256 checksum
How to use checksums
5a6d61c40cfb471dab4820ec910efe9ccf9a59f9590eea4f227eb160e7f29af1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django-model-admin-helper-0.2.1.macosx-10.6-intel.exe

Download URL django-model-admin-helper-0.2.1.macosx-10.6-intel.exe
Size 67.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d7aa99c40b948bcf8f99ab5d64c251b880ea9350eea6a14504c02e1ba614eb85
BLAKE2b-256 checksum
How to use checksums
665fd44ec0b9f0370f3151d3c0d9897efc9e2cf3c335e3bbe98e59287362d3d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-model-admin-helper 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page