Skip to main content

Shows a dialog popup with helptext for the admin fields that you have indicated.

Project description

Shows a dialog popup with helptext for the admin fields that you have indicated.

Requirements

  • django-redactoreditor

Installation

Install the app via pip:

$ pip install django-admin-dialog

Add django_admin_dialog and redactor to your installated apps:

INSTALLED_APPS = (
    ...
    'redactor',
    'django_admin_dialog',
    ...

Add the context processor to your TEMPLATE_CONTEXT_PROCESSORS:

TEMPLATE_CONTEXT_PROCESSORS = (
    ...
    'django_admin_dialog.context_processors.django_admin_dialog',
)

Override the admin base template (base.html) and include this:

{% include "django_admin_dialog/django_admin_dialog.html" %}

In your admin.py file, add this mixin for all your ModelAdmin’s that you want to add the dialog:

from django_admin_dialog.mixins import DjangoAdminDialogMixin

class MyModelAdmin(DjangoAdminDialogMixin, admin.ModelAdmin):
...

And run the migrations:

$ manage.py migrate django_admin_dialog

Usage

Access to the DjangoAdminDialog application.

https://raw.github.com/quiqueporta/django-admin-dialog/master/app.png

In this form you indicate the url on which you want to show the modal dialog boxes and the field id.

https://raw.github.com/quiqueporta/django-admin-dialog/master/admin_form.png

If you want to know the name of the form fields, you can set this setting variable:

DJANGO_ADMIN_DIALOG_SHOW_IDS = True

Now if you access to your model form, you can see the field id’s next to them.

https://raw.github.com/quiqueporta/django-admin-dialog/master/field_ids.png

When you access to your model admin form, you can see a new icon next to the field that you indicate previously.

https://raw.github.com/quiqueporta/django-admin-dialog/master/help_button.png

And now you can click on this icon to show the dialog.

https://raw.github.com/quiqueporta/django-admin-dialog/master/help_dialog.png

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-dialog-1.0.7.tar.gz (99.2 kB view details)

Uploaded Source

File details

Details for the file django-admin-dialog-1.0.7.tar.gz.

File metadata

File hashes

Hashes for django-admin-dialog-1.0.7.tar.gz
Algorithm Hash digest
SHA256 6c42032b29e17113d073112cfca5c03d94a0cfe1af96a26283be1429527bec1b
MD5 ecb195a7dd54bbb3a9d66c342357cb46
BLAKE2b-256 c843a508d806848602e180f2adc9f6e85f3e47567ab6d3fbc4a4f3d49465e93f

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