polyadmin 0.1.0b5__tar.gz → 0.1.0b7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- polyadmin-0.1.0b7/CHANGELOG.md +103 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/PKG-INFO +37 -5
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/README.md +36 -4
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/browsertests/test_flows.py +18 -3
- polyadmin-0.1.0b7/browsertests/test_sql.py +44 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/architecture.md +7 -7
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/audit.md +1 -1
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/authentication.md +2 -2
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/bulk-edit.md +1 -1
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/components.md +2 -2
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/dashboard.md +14 -14
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/deletes.md +2 -2
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/exports.md +1 -1
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/i18n.md +1 -1
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/inlines.md +5 -5
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/lists.md +5 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/model-admin.md +9 -9
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/permissions.md +4 -4
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/routing.md +15 -15
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/sqlalchemy.md +11 -11
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/templates.md +4 -4
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/README.md +6 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/main.py +11 -2
- polyadmin-0.1.0b7/examples/fastapi/project_admin.py +41 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/pyproject.toml +2 -1
- polyadmin-0.1.0b7/examples/fastapi/sql_models.py +83 -0
- polyadmin-0.1.0b7/examples/fastapi/tests/test_projects.py +19 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/uv.lock +261 -4
- polyadmin-0.1.0b7/polyadmin/contrib/fastapi/__init__.py +3 -0
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/action_forms.py +2 -2
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/auth.py +4 -36
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/csrf.py +1 -1
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/dashboard.py +4 -57
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/deletes.py +1 -1
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/errors.py +1 -1
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/handlers.py +9 -9
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/inlines.py +2 -2
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/locale.py +2 -2
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/login.py +2 -2
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/pages.py +2 -2
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/router.py +9 -9
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/static.py +3 -1
- polyadmin-0.1.0b7/polyadmin/contrib/sqlalchemy/__init__.py +3 -0
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/sqlalchemy/filters.py +1 -1
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/sqlalchemy/model_admin.py +2 -2
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/admin.py +1 -1
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/page.py +3 -3
- polyadmin-0.1.0b7/polyadmin/core/permissions.py +42 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/template_context.py +58 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/combobox.html +1 -1
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/filter-panel.html +7 -1
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/theme.html +10 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templating.py +2 -7
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/pyproject.toml +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_action_downloads.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_action_error.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_action_forms.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_action_placement.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_actions.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_async_model_admin.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_async_relations.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_audit.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_auth.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_bulk_edit.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_code_strings.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_components.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_csrf.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_dashboard.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_dashboard_export.py +4 -4
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_dashboard_lazy.py +27 -27
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_delete_preview.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_delete_selected.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_delete_selected_preview.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_errors.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_export.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_favicon.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_filters.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_htmx.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_inlines.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_list_querier.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_listopts.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_locale.py +4 -4
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_login.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_pages.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_parity_list.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_pseudo_locale.py +5 -5
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_record_form_error.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_relations.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_router.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_scroll_area.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_switcher.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/fastapi/test_theme.py +1 -1
- polyadmin-0.1.0b7/tests/contrib/sqlalchemy/__init__.py +0 -0
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/sqlalchemy/models.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/sqlalchemy/test_bulk.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/sqlalchemy/test_default_filters_http.py +2 -2
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/sqlalchemy/test_filters.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/sqlalchemy/test_hardening.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/sqlalchemy/test_list_page.py +1 -1
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/tests/contrib}/sqlalchemy/test_writes.py +2 -2
- polyadmin-0.1.0b7/tests/core/__init__.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_admin.py +10 -10
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_dashboard_widgets.py +1 -1
- polyadmin-0.1.0b7/tests/test_layering.py +43 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/uv.lock +1 -1
- polyadmin-0.1.0b5/polyadmin/fastapi/__init__.py +0 -3
- polyadmin-0.1.0b5/polyadmin/sqlalchemy/__init__.py +0 -3
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/.github/workflows/notify-docs.yml +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/.github/workflows/publish.yml +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/.gitignore +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/LICENSE +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/babel.cfg +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/browsertests/README.md +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/browsertests/conftest.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/browsertests/test_deletes.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/browsertests/test_i18n.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/browsertests/test_parity.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/concepts/architecture.md +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/concepts/model-admin.md +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/docs/python/index.md +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/README.md +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/models.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/organization_admin.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/pages.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/role_admin.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/session.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/templates/pages/broadcast.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/tests/test_app.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/examples/fastapi/user_admin.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/mkdocs.yml +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/__init__.py +0 -0
- {polyadmin-0.1.0b5/polyadmin/core → polyadmin-0.1.0b7/polyadmin/contrib}/__init__.py +0 -0
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/audit.py +0 -0
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/relations.py +0 -0
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/fastapi/responses.py +0 -0
- {polyadmin-0.1.0b5/polyadmin → polyadmin-0.1.0b7/polyadmin/contrib}/sqlalchemy/columns.py +0 -0
- {polyadmin-0.1.0b5/tests → polyadmin-0.1.0b7/polyadmin/core}/__init__.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/_async.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/action.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/audit.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/auth.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/authorization.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/csrf.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/dashboard.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/delete.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/exporter.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/field.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/filter.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/inline.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/login.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/model_admin.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/pagination.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/query.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/relation.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/slug.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/core/widget.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/i18n/__init__.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/i18n/context.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/i18n/negotiation.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/i18n/setup.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/i18n/translator.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/locale/fr/LC_MESSAGES/polyadmin.mo +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/locale/fr/LC_MESSAGES/polyadmin.po +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/locale/polyadmin.pot +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/locale/ru/LC_MESSAGES/polyadmin.mo +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/locale/ru/LC_MESSAGES/polyadmin.po +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/base.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/action_confirm_modal.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/bulk_edit_row.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/csrf-field.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/dashboard_filters.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/error_fragment.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/field.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/form_wrapper.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/icons.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/inline.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/inline_fragment.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/list_content.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/lookup_results.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/search.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/toasts.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/breadcrumb.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/bulk-actions.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/calendar.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/delete-preview.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/dropdown-menu.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/field.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/locale-switcher.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/multi-select.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/pagination.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/radio-group.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/select.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/sidebar.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/slider.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/switch.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/table.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/ui/theme-toggle.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/widget_body.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/components/widget_card.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/dashboard.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/error.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/login.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/resource/action_form.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/resource/delete.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/resource/delete_selected.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/resource/detail.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/resource/form.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/resource/list.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/activity.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/chart.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/data_table.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/data_table_rows.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/donut.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/metric.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/metric_group.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/progress.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/stat.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/table.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/tabs.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/templates/admin/widgets/timeline.html +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/polyadmin/ui.py +0 -0
- {polyadmin-0.1.0b5/tests/core → polyadmin-0.1.0b7/tests}/__init__.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/conftest.py +0 -0
- {polyadmin-0.1.0b5/tests/fastapi → polyadmin-0.1.0b7/tests/contrib}/__init__.py +0 -0
- {polyadmin-0.1.0b5/tests/sqlalchemy → polyadmin-0.1.0b7/tests/contrib/fastapi}/__init__.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/mo.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_action_decorator.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_action_form.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_action_placement.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_async.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_auth.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_authorization.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_bulk_edit.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_csrf.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_dashboard.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_dashboard_filters.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_delete.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_delete_selected_i18n.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_exporter.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_field.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_filter.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_i18n.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_inline.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_login.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_model_admin.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_pagination.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_parity.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_query.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_relation.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_template_context.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/core/test_widget.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/test_catalogs.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/test_data_cell.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/test_format.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/test_layout.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/test_templating.py +0 -0
- {polyadmin-0.1.0b5 → polyadmin-0.1.0b7}/tests/test_ui.py +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [0.1.0b7] — 2026-10-08
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **Breaking:** framework and ORM integrations moved under
|
|
10
|
+
`polyadmin.contrib`: `polyadmin.fastapi` is now
|
|
11
|
+
`polyadmin.contrib.fastapi`, and `polyadmin.sqlalchemy` is now
|
|
12
|
+
`polyadmin.contrib.sqlalchemy`. There are no compatibility aliases.
|
|
13
|
+
Install extras are unchanged.
|
|
14
|
+
- `compute_permissions` lives in `polyadmin.core.permissions`, so core no
|
|
15
|
+
longer reaches into the FastAPI adapter for it.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Form errors now appear in the browser. htmx 1.x does not swap a 422
|
|
20
|
+
response, so a form re-rendered with validation errors, or refused with
|
|
21
|
+
`RecordFormError`, left the page unchanged.
|
|
22
|
+
|
|
23
|
+
### Documentation
|
|
24
|
+
|
|
25
|
+
- README sections on contributing and the license.
|
|
26
|
+
- Examples in the docs use neutral sample domains.
|
|
27
|
+
- The example app gains SQLAlchemy-backed Clients and Projects under a
|
|
28
|
+
**Projects** sidebar group.
|
|
29
|
+
|
|
30
|
+
## [0.1.0b6] — 2026-10-01
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- A relation filter's lookup only offers the records the filter can match.
|
|
35
|
+
|
|
36
|
+
## [0.1.0b5] — 2026-09-30
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- `polyadmin.sqlalchemy.SQLAlchemyModelAdmin`: a `ModelAdmin` served from a
|
|
41
|
+
SQLAlchemy 2.x or SQLModel async session. Search, filters, ordering and
|
|
42
|
+
paging run in SQL, writes flush through the ORM so mapper events fire, and
|
|
43
|
+
`default_filters` apply until the user picks that filter.
|
|
44
|
+
- `RecordFormError`: a `ModelAdmin` can refuse a save with messages shown on
|
|
45
|
+
the form (status 422), or a delete with the reason shown on the delete page.
|
|
46
|
+
- `ActionError`: an action fails with a notification at the level it chooses,
|
|
47
|
+
and the records it already handled are audited. The built-in bulk delete and
|
|
48
|
+
bulk edit stop this way at the first failure.
|
|
49
|
+
- `ChoiceFilter` accepts `(value, label)` pairs.
|
|
50
|
+
|
|
51
|
+
## [0.1.0b4] — 2026-09-30
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
- Actions that ask for input: a form page before the action runs.
|
|
56
|
+
- Actions can answer with a file (`Download`).
|
|
57
|
+
- Bulk edit (`bulk_edit_fields`): change selected fields on many records.
|
|
58
|
+
- Dashboard filters (`DateRangeFilter`, `SelectFilter`, optionally
|
|
59
|
+
searchable) carried in the URL.
|
|
60
|
+
- Lazy, filter-aware widgets loaded from their own route, including
|
|
61
|
+
`Donut` and `Tabs`.
|
|
62
|
+
- `MetricGroup` and `DataTable` widgets. `DataTable` pages, searches and
|
|
63
|
+
colours cells with `tones`.
|
|
64
|
+
- Dashboard exports (`DashboardExport`).
|
|
65
|
+
- Widgets placed above the filter bar (`placement="top"`).
|
|
66
|
+
|
|
67
|
+
## [0.1.0b3] — 2026-09-24
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- Image fields render and upload more reliably.
|
|
72
|
+
- The login page is improved.
|
|
73
|
+
|
|
74
|
+
## [0.1.0b2] — 2026-09-23
|
|
75
|
+
|
|
76
|
+
### Fixed
|
|
77
|
+
|
|
78
|
+
- Async bulk deletion is awaited.
|
|
79
|
+
|
|
80
|
+
## [0.1.0b1] — 2026-09-22
|
|
81
|
+
|
|
82
|
+
First beta:
|
|
83
|
+
|
|
84
|
+
- `ModelAdmin` CRUD with search, filters, sorting and pagination.
|
|
85
|
+
- A widget dashboard.
|
|
86
|
+
- Relations with lookup comboboxes.
|
|
87
|
+
- Inlines.
|
|
88
|
+
- Actions.
|
|
89
|
+
- Delete previews.
|
|
90
|
+
- CSV and XLSX export.
|
|
91
|
+
- Authentication and permissions hooks.
|
|
92
|
+
- CSRF protection.
|
|
93
|
+
- French and Russian translations.
|
|
94
|
+
- The FastAPI adapter.
|
|
95
|
+
|
|
96
|
+
[Unreleased]: https://github.com/MagicRodri/polyadmin/compare/v0.1.0b7...HEAD
|
|
97
|
+
[0.1.0b7]: https://github.com/MagicRodri/polyadmin/compare/v0.1.0b6...v0.1.0b7
|
|
98
|
+
[0.1.0b6]: https://github.com/MagicRodri/polyadmin/compare/v0.1.0b5...v0.1.0b6
|
|
99
|
+
[0.1.0b5]: https://github.com/MagicRodri/polyadmin/compare/v0.1.0b4...v0.1.0b5
|
|
100
|
+
[0.1.0b4]: https://github.com/MagicRodri/polyadmin/compare/v0.1.0b3...v0.1.0b4
|
|
101
|
+
[0.1.0b3]: https://github.com/MagicRodri/polyadmin/compare/v0.1.0b2...v0.1.0b3
|
|
102
|
+
[0.1.0b2]: https://github.com/MagicRodri/polyadmin/compare/v0.1.0b1...v0.1.0b2
|
|
103
|
+
[0.1.0b1]: https://github.com/MagicRodri/polyadmin/releases/tag/v0.1.0b1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: polyadmin
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0b7
|
|
4
4
|
Summary: PolyAdmin: cross-language server-rendered admin framework (Python core)
|
|
5
5
|
Project-URL: Documentation, https://magicrodri.github.io/polyadmin-docs/
|
|
6
6
|
Project-URL: Source, https://github.com/MagicRodri/polyadmin
|
|
@@ -105,6 +105,11 @@ For the latest unreleased code, install from Git:
|
|
|
105
105
|
pip install "polyadmin[fastapi] @ git+https://github.com/MagicRodri/polyadmin.git"
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
> **0.1.0b7:** framework and ORM integrations moved under `polyadmin.contrib`.
|
|
109
|
+
> `from polyadmin.fastapi.router import create_router` is now
|
|
110
|
+
> `from polyadmin.contrib.fastapi.router import create_router`, and
|
|
111
|
+
> `polyadmin.sqlalchemy` is now `polyadmin.contrib.sqlalchemy`. Install extras are unchanged.
|
|
112
|
+
|
|
108
113
|
Declare a `ModelAdmin` against your own storage and mount it on a
|
|
109
114
|
FastAPI app:
|
|
110
115
|
|
|
@@ -114,7 +119,7 @@ from dataclasses import dataclass
|
|
|
114
119
|
from fastapi import FastAPI
|
|
115
120
|
from polyadmin import BooleanField, EmailField, ModelAdmin
|
|
116
121
|
from polyadmin.core.admin import Admin
|
|
117
|
-
from polyadmin.fastapi.router import create_router
|
|
122
|
+
from polyadmin.contrib.fastapi.router import create_router
|
|
118
123
|
|
|
119
124
|
|
|
120
125
|
@dataclass
|
|
@@ -225,7 +230,7 @@ All 9 implementation phases are done:
|
|
|
225
230
|
templates with framework/app/resource override resolution and
|
|
226
231
|
`TemplateContext` builders. Tailwind/Alpine/HTMX are CDN-loaded
|
|
227
232
|
— no frontend build step required.
|
|
228
|
-
- **FastAPI adapter** (`polyadmin/fastapi/`): `create_router` mounts full CRUD +
|
|
233
|
+
- **FastAPI adapter** (`polyadmin/contrib/fastapi/`): `create_router` mounts full CRUD +
|
|
229
234
|
list/detail/create/edit/delete + relation lookup + CSV/XLSX export routes,
|
|
230
235
|
with HTMX partial-swap for list search/filter/sort/pagination and for
|
|
231
236
|
forms, flash messages surviving a redirect, delete previews (see what a
|
|
@@ -235,9 +240,36 @@ All 9 implementation phases are done:
|
|
|
235
240
|
See [`examples/fastapi`](examples/fastapi) for a full runnable
|
|
236
241
|
reference app exercising all of this.
|
|
237
242
|
|
|
238
|
-
##
|
|
243
|
+
## Contributing
|
|
244
|
+
|
|
245
|
+
Issues and pull requests are welcome at
|
|
246
|
+
[MagicRodri/polyadmin](https://github.com/MagicRodri/polyadmin).
|
|
247
|
+
|
|
248
|
+
PolyAdmin ships in two languages kept at parity: this package and
|
|
249
|
+
[go-polyadmin](https://github.com/MagicRodri/go-polyadmin). A change to
|
|
250
|
+
behaviour, markup or a translatable string usually belongs in both; if
|
|
251
|
+
yours only touches one side, say so in the pull request so the other can
|
|
252
|
+
follow.
|
|
239
253
|
|
|
240
254
|
```bash
|
|
241
255
|
uv sync
|
|
242
|
-
uv run pytest
|
|
256
|
+
uv run pytest # unit and adapter tests
|
|
257
|
+
uv run playwright install chromium # once
|
|
258
|
+
uv run pytest browsertests # the example app in a real browser
|
|
243
259
|
```
|
|
260
|
+
|
|
261
|
+
- Add a test with the change; the browser suite covers what only a real
|
|
262
|
+
page shows (htmx swaps, Alpine components, toasts).
|
|
263
|
+
- New user-facing text goes through `gettext`/`N_` and into the French and
|
|
264
|
+
Russian catalogs (`polyadmin/locale/`); regenerate them with the
|
|
265
|
+
`pybabel` commands in [`docs/i18n.md`](docs/i18n.md) and run
|
|
266
|
+
`pybabel compile`. `tests/test_catalogs.py` fails on a missing or stale
|
|
267
|
+
entry.
|
|
268
|
+
- Note user-facing changes under **Unreleased** in
|
|
269
|
+
[`CHANGELOG.md`](CHANGELOG.md).
|
|
270
|
+
- Update [`docs/`](docs/) when behaviour changes. Examples there and in
|
|
271
|
+
[`examples/`](examples/) use neutral sample domains.
|
|
272
|
+
|
|
273
|
+
## License
|
|
274
|
+
|
|
275
|
+
[MIT](LICENSE) © 2026
|
|
@@ -73,6 +73,11 @@ For the latest unreleased code, install from Git:
|
|
|
73
73
|
pip install "polyadmin[fastapi] @ git+https://github.com/MagicRodri/polyadmin.git"
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
> **0.1.0b7:** framework and ORM integrations moved under `polyadmin.contrib`.
|
|
77
|
+
> `from polyadmin.fastapi.router import create_router` is now
|
|
78
|
+
> `from polyadmin.contrib.fastapi.router import create_router`, and
|
|
79
|
+
> `polyadmin.sqlalchemy` is now `polyadmin.contrib.sqlalchemy`. Install extras are unchanged.
|
|
80
|
+
|
|
76
81
|
Declare a `ModelAdmin` against your own storage and mount it on a
|
|
77
82
|
FastAPI app:
|
|
78
83
|
|
|
@@ -82,7 +87,7 @@ from dataclasses import dataclass
|
|
|
82
87
|
from fastapi import FastAPI
|
|
83
88
|
from polyadmin import BooleanField, EmailField, ModelAdmin
|
|
84
89
|
from polyadmin.core.admin import Admin
|
|
85
|
-
from polyadmin.fastapi.router import create_router
|
|
90
|
+
from polyadmin.contrib.fastapi.router import create_router
|
|
86
91
|
|
|
87
92
|
|
|
88
93
|
@dataclass
|
|
@@ -193,7 +198,7 @@ All 9 implementation phases are done:
|
|
|
193
198
|
templates with framework/app/resource override resolution and
|
|
194
199
|
`TemplateContext` builders. Tailwind/Alpine/HTMX are CDN-loaded
|
|
195
200
|
— no frontend build step required.
|
|
196
|
-
- **FastAPI adapter** (`polyadmin/fastapi/`): `create_router` mounts full CRUD +
|
|
201
|
+
- **FastAPI adapter** (`polyadmin/contrib/fastapi/`): `create_router` mounts full CRUD +
|
|
197
202
|
list/detail/create/edit/delete + relation lookup + CSV/XLSX export routes,
|
|
198
203
|
with HTMX partial-swap for list search/filter/sort/pagination and for
|
|
199
204
|
forms, flash messages surviving a redirect, delete previews (see what a
|
|
@@ -203,9 +208,36 @@ All 9 implementation phases are done:
|
|
|
203
208
|
See [`examples/fastapi`](examples/fastapi) for a full runnable
|
|
204
209
|
reference app exercising all of this.
|
|
205
210
|
|
|
206
|
-
##
|
|
211
|
+
## Contributing
|
|
212
|
+
|
|
213
|
+
Issues and pull requests are welcome at
|
|
214
|
+
[MagicRodri/polyadmin](https://github.com/MagicRodri/polyadmin).
|
|
215
|
+
|
|
216
|
+
PolyAdmin ships in two languages kept at parity: this package and
|
|
217
|
+
[go-polyadmin](https://github.com/MagicRodri/go-polyadmin). A change to
|
|
218
|
+
behaviour, markup or a translatable string usually belongs in both; if
|
|
219
|
+
yours only touches one side, say so in the pull request so the other can
|
|
220
|
+
follow.
|
|
207
221
|
|
|
208
222
|
```bash
|
|
209
223
|
uv sync
|
|
210
|
-
uv run pytest
|
|
224
|
+
uv run pytest # unit and adapter tests
|
|
225
|
+
uv run playwright install chromium # once
|
|
226
|
+
uv run pytest browsertests # the example app in a real browser
|
|
211
227
|
```
|
|
228
|
+
|
|
229
|
+
- Add a test with the change; the browser suite covers what only a real
|
|
230
|
+
page shows (htmx swaps, Alpine components, toasts).
|
|
231
|
+
- New user-facing text goes through `gettext`/`N_` and into the French and
|
|
232
|
+
Russian catalogs (`polyadmin/locale/`); regenerate them with the
|
|
233
|
+
`pybabel` commands in [`docs/i18n.md`](docs/i18n.md) and run
|
|
234
|
+
`pybabel compile`. `tests/test_catalogs.py` fails on a missing or stale
|
|
235
|
+
entry.
|
|
236
|
+
- Note user-facing changes under **Unreleased** in
|
|
237
|
+
[`CHANGELOG.md`](CHANGELOG.md).
|
|
238
|
+
- Update [`docs/`](docs/) when behaviour changes. Examples there and in
|
|
239
|
+
[`examples/`](examples/) use neutral sample domains.
|
|
240
|
+
|
|
241
|
+
## License
|
|
242
|
+
|
|
243
|
+
[MIT](LICENSE) © 2026
|
|
@@ -349,16 +349,31 @@ def test_filtering_by_a_related_record(admin_page):
|
|
|
349
349
|
trigger = panel.locator('input[role="combobox"]').first
|
|
350
350
|
expect(trigger).to_be_visible()
|
|
351
351
|
trigger.click()
|
|
352
|
+
# Before typing: the unfiltered page includes an organization "Acme"
|
|
353
|
+
# would never match, so the assertions below only pass once /lookup
|
|
354
|
+
# actually narrows to the typed query (the combobox's text input has
|
|
355
|
+
# to carry its value as the request's own "q" for that to happen --
|
|
356
|
+
# a bug here previously left every keystroke re-fetching the same
|
|
357
|
+
# unfiltered list, which "an option is visible" alone would not catch).
|
|
358
|
+
expect(admin_page.locator('[role="listbox"]', has_text="Widgets Inc")).to_be_visible()
|
|
352
359
|
# Typed, not filled: the lookup fires on keyup (hx-trigger), and
|
|
353
360
|
# fill() sets the value without dispatching one.
|
|
354
361
|
trigger.press_sequentially("Acme", delay=30)
|
|
355
|
-
|
|
356
|
-
expect(
|
|
357
|
-
|
|
362
|
+
options = admin_page.locator('[role="listbox"] [data-pk]')
|
|
363
|
+
expect(options.first).to_be_visible()
|
|
364
|
+
expect(admin_page.locator('[role="listbox"]', has_text="Widgets Inc")).to_have_count(0)
|
|
365
|
+
for label in options.all_inner_texts():
|
|
366
|
+
assert "acme" in label.lower(), f"unfiltered result leaked through: {label!r}"
|
|
367
|
+
options.first.click()
|
|
358
368
|
panel.locator('button[type="submit"]').first.click()
|
|
359
369
|
|
|
360
370
|
expect(admin_page).to_have_url(re.compile(r"filter"))
|
|
361
371
|
expect(admin_page.locator("table tbody tr").first).to_be_visible()
|
|
372
|
+
# The combobox's text input rides in the same form Apply submits
|
|
373
|
+
# natively (hx-disinherit isolates its own /lookup wiring, not this).
|
|
374
|
+
# Without the form's own hx-params="not q" excluding it, the search
|
|
375
|
+
# text tags along into this URL as a stray, meaningless ?q=Acme.
|
|
376
|
+
assert "q=" not in admin_page.url, f"combobox search text leaked into the URL: {admin_page.url}"
|
|
362
377
|
|
|
363
378
|
|
|
364
379
|
def test_the_filter_panel_combobox_is_not_clipped(admin_page):
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""The SQL-backed Projects resources, in a real browser.
|
|
2
|
+
|
|
3
|
+
Nothing here changes the seed: the create and the delete are both refused,
|
|
4
|
+
so the other tests still find six projects and three clients.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import re
|
|
8
|
+
|
|
9
|
+
from conftest import ADMIN_URL
|
|
10
|
+
from playwright.sync_api import expect
|
|
11
|
+
|
|
12
|
+
NAME_FIELD = "#field-name"
|
|
13
|
+
STATUS_NAME = "status"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_the_active_default_hides_finished_work_until_all_is_chosen(admin_page):
|
|
17
|
+
admin_page.goto(f"{ADMIN_URL}/projects")
|
|
18
|
+
expect(admin_page.get_by_role("cell", name="Apollo", exact=True)).to_be_visible()
|
|
19
|
+
expect(admin_page.get_by_text("Cascade")).to_have_count(0)
|
|
20
|
+
admin_page.click("button:has-text('Filters')")
|
|
21
|
+
panel = admin_page.locator('[role="dialog"][aria-label="Filters"]')
|
|
22
|
+
expect(panel).to_be_visible()
|
|
23
|
+
panel.locator("div:has(> h3:text-is('Active'))").get_by_role("link", name="All").click()
|
|
24
|
+
expect(admin_page.get_by_text("Cascade")).to_be_visible()
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_a_duplicate_name_is_refused_on_the_form(admin_page):
|
|
28
|
+
admin_page.goto(f"{ADMIN_URL}/projects/create")
|
|
29
|
+
admin_page.fill(NAME_FIELD, "Apollo")
|
|
30
|
+
admin_page.locator(f"[x-data*='adminSelect']:has(input[name='{STATUS_NAME}']) button").first.click()
|
|
31
|
+
admin_page.get_by_role("option", name="planned").click()
|
|
32
|
+
admin_page.click("button[type=submit][form=resource-form]")
|
|
33
|
+
expect(admin_page.locator("[role=alert]").first).to_be_visible()
|
|
34
|
+
expect(admin_page.locator(NAME_FIELD)).to_have_value("Apollo")
|
|
35
|
+
expect(admin_page).to_have_url(re.compile(r"/projects/create$"))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def test_a_client_with_projects_cannot_be_deleted(admin_page):
|
|
39
|
+
admin_page.goto(f"{ADMIN_URL}/clients/1/delete")
|
|
40
|
+
admin_page.click("#delete-confirm")
|
|
41
|
+
expect(admin_page).to_have_url(re.compile(r"/clients/1/delete$"))
|
|
42
|
+
expect(admin_page.locator("body > ol[aria-label] > li")).to_have_count(1)
|
|
43
|
+
admin_page.goto(f"{ADMIN_URL}/clients")
|
|
44
|
+
expect(admin_page.get_by_role("cell", name="Northwind", exact=True)).to_be_visible()
|
|
@@ -15,7 +15,7 @@ type (string, integer, boolean, date, email, foreign key, ...),
|
|
|
15
15
|
whether it's required/readonly/disabled, and how to read a value off
|
|
16
16
|
an arbitrary object and coerce a submitted form value back into one.
|
|
17
17
|
Fields don't know about HTTP or HTML — they're the data-level contract
|
|
18
|
-
everything else builds on. See [`model-admin
|
|
18
|
+
everything else builds on. See [`model-admin`](model-admin.md).
|
|
19
19
|
|
|
20
20
|
**`ModelAdmin`** is one resource: which model it administers, which
|
|
21
21
|
fields appear in the list/detail/form views, search/filter/ordering
|
|
@@ -24,7 +24,7 @@ config, the CRUD lifecycle hooks (`get_queryset`, `get_object`,
|
|
|
24
24
|
relation fields. A `ModelAdmin` never touches your database directly —
|
|
25
25
|
it's an abstract contract; your subclass implements the lifecycle hooks
|
|
26
26
|
against whatever storage you actually have. See
|
|
27
|
-
[`model-admin
|
|
27
|
+
[`model-admin`](model-admin.md).
|
|
28
28
|
|
|
29
29
|
**`Admin`** is the site: a registry of `ModelAdmin`s keyed by slug,
|
|
30
30
|
plus the optional `Dashboard`, `Authenticator`, and `Authorizer` for
|
|
@@ -32,12 +32,12 @@ the whole site, and branding (`site_title`, `site_logo_url`). It owns
|
|
|
32
32
|
no HTTP concerns either — mounting it onto a real router is the
|
|
33
33
|
adapter's job.
|
|
34
34
|
|
|
35
|
-
**The adapter** (`polyadmin.fastapi`) is the only layer that knows
|
|
35
|
+
**The adapter** (`polyadmin.contrib.fastapi`) is the only layer that knows
|
|
36
36
|
about HTTP. `create_router(admin, base_path=...)` walks the `Admin`'s
|
|
37
37
|
registry and builds routes for each
|
|
38
38
|
viewable/creatable/updatable/deletable/exportable `ModelAdmin`, wires
|
|
39
39
|
in the `Authenticator`/`Authorizer` on every route, and renders
|
|
40
|
-
responses through a `Renderer`. See [`routing
|
|
40
|
+
responses through a `Renderer`. See [`routing`](routing.md).
|
|
41
41
|
|
|
42
42
|
## Request flow
|
|
43
43
|
|
|
@@ -58,7 +58,7 @@ A request for `GET /admin/users` (list view) goes:
|
|
|
58
58
|
`Authorizer` too — a relation only renders as a clickable link if
|
|
59
59
|
the principal can view the target resource, otherwise it falls back
|
|
60
60
|
to plain text.
|
|
61
|
-
5. The `Renderer` picks a template (see [`templates
|
|
61
|
+
5. The `Renderer` picks a template (see [`templates`](templates.md)
|
|
62
62
|
for the override order), builds its context, and returns HTML — a
|
|
63
63
|
full page normally, or just the `#resource-list` fragment when the
|
|
64
64
|
request came from an HTMX-driven search/filter/sort/pagination
|
|
@@ -99,6 +99,6 @@ validation redisplay). Tailwind, Alpine (plus its focus/collapse/anchor
|
|
|
99
99
|
plugins), and HTMX are all CDN-loaded — there is no frontend build
|
|
100
100
|
step.
|
|
101
101
|
|
|
102
|
-
See [`components
|
|
103
|
-
porting rationale, and [`templates
|
|
102
|
+
See [`components`](components.md) for the component reference and the
|
|
103
|
+
porting rationale, and [`templates`](templates.md#styling) for how to
|
|
104
104
|
retheme.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The admin can record every change it makes — who did what, to which
|
|
4
4
|
record, and when. **Where that record lives is your decision**: the
|
|
5
5
|
framework does not store a log itself, for the same reason it does not
|
|
6
|
-
own identity or persistence (see [`authentication
|
|
6
|
+
own identity or persistence (see [`authentication`](authentication.md)).
|
|
7
7
|
|
|
8
8
|
Nothing is recorded until you configure a logger.
|
|
9
9
|
|
|
@@ -40,7 +40,7 @@ admin = Admin(
|
|
|
40
40
|
`Principal.extra` is a free-form bag for whatever your own `Authorizer`
|
|
41
41
|
needs beyond `is_superuser` (roles, team IDs, scopes, ...) — the core
|
|
42
42
|
never reads it itself. A `locale_resolver` (see
|
|
43
|
-
[`i18n
|
|
43
|
+
[`i18n`](i18n.md#how-a-requests-locale-is-chosen)) can read it too —
|
|
44
44
|
a per-user language preference stashed in `extra` is a common use —
|
|
45
45
|
since it receives the same `Principal` `authenticate` produced for
|
|
46
46
|
this request. Authentication still runs at most once per request even
|
|
@@ -146,7 +146,7 @@ If `Authenticator.authenticate` returns `None`, the adapter responds
|
|
|
146
146
|
`401 Unauthorized` before any `ModelAdmin` code runs — or redirects to
|
|
147
147
|
the login page, if a `login_backend` is configured (see above). A
|
|
148
148
|
`Principal` that authenticates successfully but fails the subsequent
|
|
149
|
-
authorization check (see [`permissions
|
|
149
|
+
authorization check (see [`permissions`](permissions.md)) gets
|
|
150
150
|
`403 Forbidden` instead — the two failure modes are distinguished
|
|
151
151
|
deliberately, same as any standard web framework's auth stack.
|
|
152
152
|
|
|
@@ -106,7 +106,7 @@ an explicit `dark:` variant instead.
|
|
|
106
106
|
|
|
107
107
|
To restyle the admin, override `admin/theme.html` and change the
|
|
108
108
|
variables. Nothing else needs to know — see
|
|
109
|
-
[`templates
|
|
109
|
+
[`templates`](templates.md#styling).
|
|
110
110
|
|
|
111
111
|
## Component reference
|
|
112
112
|
|
|
@@ -169,7 +169,7 @@ says otherwise.
|
|
|
169
169
|
|
|
170
170
|
## Using components on a custom page
|
|
171
171
|
|
|
172
|
-
A custom `AdminPage` ([`routing
|
|
172
|
+
A custom `AdminPage` ([`routing`](routing.md#custom-admin-pages))
|
|
173
173
|
gets the same components — `ui` is a global in the Jinja environment
|
|
174
174
|
and every `ui/*` macro is importable by name, including from page
|
|
175
175
|
templates resolved through `template_dirs`. The example app's broadcast
|
|
@@ -116,7 +116,7 @@ happens to include others.
|
|
|
116
116
|
Every widget accepts `size="lg"` to span the full grid width instead of
|
|
117
117
|
one column, and an optional `permission=`: a widget naming a permission
|
|
118
118
|
is simply omitted (not shown-disabled) if the `Authorizer` denies it
|
|
119
|
-
for the current principal — see [`permissions
|
|
119
|
+
for the current principal — see [`permissions`](permissions.md).
|
|
120
120
|
|
|
121
121
|
## Filters
|
|
122
122
|
|
|
@@ -130,7 +130,7 @@ dashboard = Dashboard(
|
|
|
130
130
|
title="Statistics",
|
|
131
131
|
filters=[
|
|
132
132
|
DateRangeFilter("period", label="Period", default_days=30),
|
|
133
|
-
SelectFilter("
|
|
133
|
+
SelectFilter("store_id", label="Store", empty_label="All stores", get_choices=load_stores),
|
|
134
134
|
],
|
|
135
135
|
widgets=[...],
|
|
136
136
|
)
|
|
@@ -188,8 +188,8 @@ Several numbers that one call answers:
|
|
|
188
188
|
async def overview(ctx):
|
|
189
189
|
data = await analytics.overview()
|
|
190
190
|
return [
|
|
191
|
-
Tile("
|
|
192
|
-
Tile("
|
|
191
|
+
Tile("Orders", data["orders"], icon="file-text"),
|
|
192
|
+
Tile("Returning customers", data["returning"], icon="activity", hint=f"new: {data['new']}"),
|
|
193
193
|
]
|
|
194
194
|
|
|
195
195
|
MetricGroup("Overview", key="overview", size="full", depends_on=[], get_tiles=overview)
|
|
@@ -200,18 +200,18 @@ MetricGroup("Overview", key="overview", size="full", depends_on=[], get_tiles=ov
|
|
|
200
200
|
Rows the host fetches a page at a time, e.g. from another service:
|
|
201
201
|
|
|
202
202
|
```python
|
|
203
|
-
async def
|
|
204
|
-
data = await analytics.
|
|
203
|
+
async def sales_by_store(ctx):
|
|
204
|
+
data = await analytics.sales(period=ctx.filters["period"], limit=ctx.limit, offset=ctx.offset)
|
|
205
205
|
return Rows(data["items"], total=data["total"], totals=data["overall"])
|
|
206
206
|
|
|
207
207
|
DataTable(
|
|
208
|
-
"
|
|
208
|
+
"Sales", key="sales", size="full",
|
|
209
209
|
columns=[
|
|
210
|
-
Column("
|
|
211
|
-
Column("
|
|
212
|
-
Column("
|
|
210
|
+
Column("store", "Store", strong=True),
|
|
211
|
+
Column("orders", "Orders", align="end", format="number"),
|
|
212
|
+
Column("card", "Paid by card", align="end", format="share"),
|
|
213
213
|
],
|
|
214
|
-
get_rows=
|
|
214
|
+
get_rows=sales_by_store, page_size=50, searchable=True, total_label="{total} stores",
|
|
215
215
|
)
|
|
216
216
|
```
|
|
217
217
|
|
|
@@ -233,7 +233,7 @@ DataTable(
|
|
|
233
233
|
| `share` | `{"count": 12, "percentage": 34.5}` | `12 (34.5%)`; just `0` when the count is 0 |
|
|
234
234
|
| `percent` | a number | `87.3%` |
|
|
235
235
|
|
|
236
|
-
`empty="
|
|
236
|
+
`empty="no sales"` on a column shows that text as a badge in an empty
|
|
237
237
|
cell instead of a dash. It goes through translation like other labels.
|
|
238
238
|
|
|
239
239
|
`tones=((80, "success"), (50, "warning"), (0, "danger"))` colours a numeric
|
|
@@ -248,7 +248,7 @@ panels does, so a card of breakdowns can follow the filters:
|
|
|
248
248
|
|
|
249
249
|
```python
|
|
250
250
|
Tabs("Breakdowns", key="breakdowns", size="full", panels=[
|
|
251
|
-
("
|
|
251
|
+
("Payment methods", Donut("Payment methods", get_series=payment_methods)),
|
|
252
252
|
("Users by role", Donut("Users by role", get_series=users_by_role)),
|
|
253
253
|
])
|
|
254
254
|
```
|
|
@@ -321,5 +321,5 @@ create_router(admin, base_path="/admin", template_dirs=["templates"])
|
|
|
321
321
|
The framework's own widget templates (`Metric`, `Stat`, `Progress`,
|
|
322
322
|
`Chart`, `Donut`, `Table`, `Activity`, `Timeline`, `Tabs`) are checked
|
|
323
323
|
first, so a custom `template` value only needs to avoid colliding with
|
|
324
|
-
`admin/widgets/*.html` — see [`templates
|
|
324
|
+
`admin/widgets/*.html` — see [`templates`](templates.md) for the
|
|
325
325
|
full resolution order shared with per-resource overrides.
|
|
@@ -123,7 +123,7 @@ principal may not delete refuses the whole delete, because otherwise
|
|
|
123
123
|
this delete would be a way around that rule. The check is the same pair
|
|
124
124
|
the rest of the admin uses: the target ModelAdmin's own `can_delete`,
|
|
125
125
|
then the authorizer's `<slug>.delete`. See
|
|
126
|
-
[`permissions
|
|
126
|
+
[`permissions`](permissions.md).
|
|
127
127
|
|
|
128
128
|
Two consequences worth stating plainly:
|
|
129
129
|
|
|
@@ -187,6 +187,6 @@ its routes behave exactly as before.
|
|
|
187
187
|
second level of cascade is yours to include if it matters.
|
|
188
188
|
- **It does not write audit entries for cascaded records.** One entry is
|
|
189
189
|
recorded for the record the admin deleted — see
|
|
190
|
-
[`audit
|
|
190
|
+
[`audit`](audit.md).
|
|
191
191
|
- **It previews deletes only.** Other actions still use their `confirm`
|
|
192
192
|
text.
|
|
@@ -71,4 +71,4 @@ translation attempted from inside `stream` itself would silently fall
|
|
|
71
71
|
back to English. A custom `Exporter` translating anything else of its
|
|
72
72
|
own has to do the same — read `gettext`/`get_locale()` before
|
|
73
73
|
returning its generator, not from within it. See
|
|
74
|
-
[`i18n
|
|
74
|
+
[`i18n`](i18n.md#in-code).
|
|
@@ -87,7 +87,7 @@ Resolved once per request, before any handler runs. First match wins:
|
|
|
87
87
|
next step. Authentication happens at most once per
|
|
88
88
|
request even when both the locale resolver and the route's own
|
|
89
89
|
authorization need the principal — the second lookup reuses the
|
|
90
|
-
first's result. See [`authentication
|
|
90
|
+
first's result. See [`authentication`](authentication.md).
|
|
91
91
|
3. `Accept-Language`, best match against the supported set, honouring
|
|
92
92
|
q-values.
|
|
93
93
|
4. `default_locale`.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A parent `ModelAdmin` can show and manage a child `ModelAdmin`'s
|
|
4
4
|
records that point back at it, right on the parent's own
|
|
5
5
|
create/detail/edit pages — Django-admin `StackedInline`/`TabularInline`
|
|
6
|
-
style. `Relation` (see [`model-admin
|
|
6
|
+
style. `Relation` (see [`model-admin`](model-admin.md#relations))
|
|
7
7
|
only models the *forward* direction (a child field pointing at its
|
|
8
8
|
parent); `Inline` is the reverse.
|
|
9
9
|
|
|
@@ -60,7 +60,7 @@ whole target collection. Each row and the add row get their own results panel.
|
|
|
60
60
|
|
|
61
61
|
## Generated routes
|
|
62
62
|
|
|
63
|
-
See [`routing
|
|
63
|
+
See [`routing`](routing.md#inline-routes) for the three routes
|
|
64
64
|
(`POST .../inlines/{child_slug}`, `POST .../inlines/{child_slug}/{child_pk}`,
|
|
65
65
|
`DELETE .../inlines/{child_slug}/{child_pk}`) and why there's no
|
|
66
66
|
`GET .../inlines/{child_slug}` fragment route. Every inline mutation
|
|
@@ -85,7 +85,7 @@ commits every row together with the parent form.
|
|
|
85
85
|
- **Detail page** — read-only. Each child renders using its own
|
|
86
86
|
`detail_fields`, linking to that child's own detail
|
|
87
87
|
page (permission-gated the same way an ordinary relation link is —
|
|
88
|
-
see [`permissions
|
|
88
|
+
see [`permissions`](permissions.md#where-its-enforced)); no
|
|
89
89
|
add/edit/remove controls here.
|
|
90
90
|
|
|
91
91
|
## Permissions
|
|
@@ -97,7 +97,7 @@ relation-link hiding elsewhere in the framework). Add/edit/remove each
|
|
|
97
97
|
require the child's own `.create`/`.update`/`.delete` respectively,
|
|
98
98
|
**and** implicitly the parent's own `.update` — inline management only
|
|
99
99
|
exists on the parent's edit page, which is already gated by that
|
|
100
|
-
route. See [`permissions
|
|
100
|
+
route. See [`permissions`](permissions.md#permission-names).
|
|
101
101
|
|
|
102
102
|
## Async and `list_page` children
|
|
103
103
|
|
|
@@ -114,7 +114,7 @@ as before.
|
|
|
114
114
|
|
|
115
115
|
- **One inline per child slug per parent.** A parent can declare
|
|
116
116
|
multiple inlines (e.g. Organization → Users *and* Organization →
|
|
117
|
-
|
|
117
|
+
Projects), but not two inlines pointing at the same child
|
|
118
118
|
`ModelAdmin`. Not validated beyond the duplicate-slug check at
|
|
119
119
|
mount time — there's no disambiguating name yet.
|
|
120
120
|
- **No field subsetting** — see above.
|
|
@@ -181,6 +181,11 @@ same answer in both places.
|
|
|
181
181
|
A reader who may not view the target resource does not get the filter at
|
|
182
182
|
all — it is dropped from the panel rather than shown empty.
|
|
183
183
|
|
|
184
|
+
When the relation uses `autocomplete_fields`, typing searches the target's
|
|
185
|
+
lookup endpoint and narrows the combobox options. The lookup text is not
|
|
186
|
+
included in the list URL when the filter is applied; only the selected
|
|
187
|
+
`filter[...]` value is submitted.
|
|
188
|
+
|
|
184
189
|
**One limitation worth knowing.** `apply` receives the parent
|
|
185
190
|
ModelAdmin, not the registry, so it cannot call the target's own
|
|
186
191
|
`get_pk`. It uses the same default lookup `ModelAdmin.get_pk` does. If
|