path('form_example_1/', views.form_example_1, name='example_1'), path('form_example_2/', views.form_example_2, name='example_2'), path('form_example_2b/', Form.create(auto__model=Foo).as_view(), name='example_2b'), path('form_example_3/', views.form_example_3, name='example_3'), path('form_example_4/', views.form_example_4, name='example_4'), path('form_example_5/', views.form_example_5, name='example_5'), path('form_kitchen/', views.form_kitchen), path('table_readme_example_1/', views.table_readme_example_1, name='readme_example_1'), path('table_readme_example_2/', views.table_readme_example_2, name='readme_example_2'), path('table_auto_example_1/', views.table_auto_example_1, name='readme_example_1'), path('table_auto_example_2/', views.table_auto_example_2, name='readme_example_2'), path('table_kitchen_sink/', views.table_kitchen_sink, name='kitchen_sink'), path('table_as_view/', Table( auto__model=TFoo, columns__a__bulk__include=True, bulk__actions__delete__include=True, extra_evaluated__report_name='example_download', columns__a__extra_evaluated__report_name='A' ).as_view()), path('page_busy/', views.page_busy, name='page_busy'), path('all_field_sorts/', views.all_field_sorts, name='all_field_sorts'), path('all_column_sorts/', views.all_column_sorts, name='all_column_sorts'), path('iommi-admin/', include(Admin.urls())), path('menu_test/', views.menu_test, name='menu_test'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from iommi.admin import ( Admin, Messages, collect_config, ) from iommi.base import values from tests.helpers import ( req, staff_req, user_req, ) from tests.models import Foo urlpatterns = [ path('', include(Admin.urls())), ] @pytest.mark.django_db def test_bulk_edit_for_non_unique(settings): settings.ROOT_URLCONF = __name__ request = staff_req('get') p = Admin.list( request=request, app_name='tests', model_name='adminunique', parts__list_tests_adminunique__columns__foo__bulk__include=True, ) p = p.bind(request=request) assert [