django-admin-wizard
django-admin-wizard is a Django app providing helpers for django admin actions with intermediate forms.
Description
Do you know "delete selected" action in Django-admin? This package provides helpers for creating such actions with intermediate forms in two lines of code. Also, you may add a link from django admin change page to a custom form view to perform some form-supplied action on single object.
Installation
pip install django-admin-wizard
Working example is in testproject.testapp.
- Add application to installed apps in django settings:
INSTALLED_APPS.append('admin_wizard')
- And an action to your admin:
from django.contrib import admin from admin_wizard.admin import UpdateAction from testproject.testapp import forms, models @admin.register(models.MyModel) class MyModelAdmin(admin.ModelAdmin): actions = [UpdateAction(form_class=forms.RenameForm)]
- Add custom view to your admin:
from django.contrib import admin from django.urls import path from admin_wizard.admin import UpdateDialog from testproject.testapp import forms, models @admin.register(models.MyModel) class MyModelAdmin(admin.ModelAdmin): def get_urls(self): urls = [ path('<int:pk>/rename/', UpdateDialog.as_view(model_admin=self, model=models.MyModel, form_class=forms.RenameForm), name='rename') ] return urls + super().get_urls()
- Add a link to custom dialog in admin change page:
from django.contrib import admin from django.urls import reverse from testproject.testapp import models @admin.register(models.MyModel) class MyModelAdmin(admin.ModelAdmin): readonly_fields = ('update_obj_url',) def update_obj_url(self, obj): # FIXME: it's XSS, don't copy-paste url = reverse('admin:rename', kwargs=dict(pk=obj.pk)) return f'<a href="{url}">Rename...</a>' update_obj_url.short_description = 'rename'
Now you have "rename" action in changelist and "rename" link in change view. Enjoy :)
Metadata
Release files for django-admin-wizard 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_admin_wizard-0.6.0.tar.gz | 7.8 kB | Without provenance | Details for django_admin_wizard-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_admin_wizard-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for django_admin_wizard-0.6.0-py3-none-any.whl |
Total release size: 16.2 kB
Release files / django_admin_wizard-0.6.0.tar.gz
| Download URL | django_admin_wizard-0.6.0.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
780b132b6b4eb15f6f54391d290bcdc2e47e32bf7f9214ea58803052d7985616
|
|
BLAKE2b-256 checksum How to use checksums |
1b99c988eaf147f613a05f6e64f5f525068132dc52194ec2885b4b22766d8462
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / django_admin_wizard-0.6.0-py3-none-any.whl
| Download URL | django_admin_wizard-0.6.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
491b35d599daf6e5c2fe14c1876e19617f44a4cfecf021065afba8718563d3ac
|
|
BLAKE2b-256 checksum How to use checksums |
4bdb1575089435befee150b189918822dececff8f5f57bb9be1414109e24a9bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for django-admin-wizard 0.6.0
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.