-
Notifications
You must be signed in to change notification settings - Fork 6
Add AdminMixin #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add AdminMixin #49
Conversation
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
9f36a9c
to
382838e
Compare
58095a0
to
b40b3c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an AdminMixin that integrates Django FSM transitions with the administration interface, including support for django‐fsm-log and various customizations. Key changes include dependency additions (django‐fsm-log), tests for FSM admin functionality, updates to models and admin classes for state and step transitions, and documentation updates for admin integration.
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tox.ini | Added django-fsm-log dependency |
tests/testapp/tests/test_transition_all_except_target.py | Renamed test class to align with model naming |
tests/testapp/tests/test_admin.py | Introduced tests to verify FSM admin transitions |
tests/testapp/models.py | Added AdminBlogPost model with defined FSM transitions |
tests/testapp/admin.py | Implemented AdminBlogPostAdmin using FSMAdminMixin |
tests/settings.py | Updated installed apps and configured FSM log settings |
pyproject.toml | Added dependency on django_fsm_log |
django_fsm/templates/django_fsm/fsm_admin_change_form.html | Created a template for admin change form with FSM buttons |
django_fsm/admin.py | Updated FSMAdminMixin implementation |
README.md | Provided updated documentation for admin integration |
Comments suppressed due to low confidence (2)
README.md:430
- The code example for customizing the label uses an invalid dictionary syntax; please use a colon (:) instead of '='. For example: custom={"label": "My awesome transition"}.
fsm_field = ['my_fsm_field',]
README.md:454
- The code example demonstrating admin transition disallowance uses an invalid dictionary syntax; please update it to use a colon, for example: custom={"admin": False}.
custom={"admin"=False},
Proposal to add an AdminMixin based on https://github.com/etchegom/django-fsm-admin-lite ( #38 ).
Scope:
django-fsm-log
compatibility