Adds confirmation to Django Admin changes and additions
Project description
Django Admin Confirm
AdminConfirmMixin is a mixin for ModelAdmin to add confirmations to changes and additions.
It can be configured to add a confirmation page upon saving changes and/or additions on ModelAdmin.
Typical Usage:
from admin_confirm import AdminConfirmMixin
class MyModelAdmin(AdminConfirmMixin, ModelAdmin):
confirm_change = True
confirmation_fields = ['field1', 'field2']
Installation
Install django-admin-confirm by running:
pip install django-admin-confirm
Add to INSTALLED_APPS in your project settings before django.contrib.admin
:
INSTALLED_APPS = [
...
'admin_confirm',
'django.contrib.admin',
...
]
Note that this project follows the template override rules of Django.
To override a template, your app should be listed before admin_confirm
in INSTALLED_APPS.
Configuration Options
confirm_change
Optional[bool] - decides if changes should trigger confirmationconfirm_add
Optional[bool] - decides if additions should trigger confirmationconfirmation_fields
Optional[Array[string]] - sets which fields changes should trigger confirmationchange_confirmation_template
Optional[string] - path to custom html template to use
Note that setting confirmation_fields
without setting confirm_change
or confirm_add
would not trigger confirmation.
Contribution & Appreciation
Contributions are most welcome :) Feel free to:
- address an issue
- raise an issue
- add more test cases
- add feature requests
Your appreciation is also very welcome :) Feel free to:
- star the project
- open an issue just to share your thanks
Feature List
This is a list of features which could potentially be added in the future. Some of which might make more sense in their own package.
- confirmations on changelist actions
- global actions on changelist page
- instance actions on change/view page
- action logs (adding actions to history of instances)
- add help tooltip/popover to any field for more info
- run scripts from admin
- completed action summary page
- add top and bottom areas to instance pages which can be configured for any content
Support
If you are having issues, please let us know through raising an issue.
License
The project is licensed under the Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for django-admin-confirm-0.1-1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9789af179ce64188c94319dbc59c185f75f9ce532edf180a21350a60d6f0328a |
|
MD5 | 50301de3f1dcf7107b65e27d5282706b |
|
BLAKE2b-256 | fcb7b9ba6966902a1a4bc1c2c5b1d934ff1acf90355051a032d54ca87b0f452b |
Hashes for django_admin_confirm-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc8e4bca238e67cb44544656b90401c8a331e9afac921b4cd8fef78f10aadff1 |
|
MD5 | 5754b86be31b9ec30ccd6423d967efa2 |
|
BLAKE2b-256 | 0a5eacbf6f0a4f7586cd324439504477d0c2f7007cd729bc9adb1228093e8959 |
Hashes for django_admin_confirm-0.1-1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4dc4f79c4bcd3dd8c31202f49b4b2299754b13dfdcb2582e54ec6c1f13f8282 |
|
MD5 | 8e0ea2333358117231827925d5615d62 |
|
BLAKE2b-256 | b2c819ad83c0a9788c9382e63cd46a7fad1a02671eb5b2b05521aa51708ea44f |