Skip to content
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

Allow massadmin to be used with a custom AdminSite #61

Closed
wants to merge 1 commit into from
Closed

Allow massadmin to be used with a custom AdminSite #61

wants to merge 1 commit into from

Conversation

ecederstrand
Copy link
Contributor

Django allows customization of AdminSites, as described in https://docs.djangoproject.com/en/1.9/ref/contrib/admin/#customizing-adminsite
This patch allows massadmin to work with a custom AdminSite by passing the custom site to the view (it is also necessary to add the mass_change_selected action to the custom site):

from massadmin import mass_change_selected

admin_site = MyCustomAdminSite(name='custom_admin')
admin_site.add_action(mass_change_selected)

url(r'^admin/', include(massadmin.urls), kwargs={'admin_site': admin_site}),

Django allows customization of AdminSites, as described in https://docs.djangoproject.com/en/1.9/ref/contrib/admin/#customizing-adminsite
This patch allows massadmin to work with a custom AdminSite by passing the custom site to the view (it is also necessary to add the mass_change_selected action to the custom site):

    from massadmin import mass_change_selected

    admin_site = MyCustomAdminSite(name='custom_admin')
    admin_site.add_action(mass_change_selected)

    url(r'^admin/', include(massadmin.urls), kwargs={'admin_site': admin_site}),
@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.111% when pulling 6e66887 on ecederstrand:patch-1 into 38b2b28 on burke-software:master.

@PetrDlouhy
Copy link
Collaborator

@ecederstrand Could you please also add test for this functionality?

@ecederstrand
Copy link
Contributor Author

Sorry for the late reply. Of course a test should go with the patch, but 'm unfamiliar with your test suite and unsure how to go about testing this. Could you nudge me in the rigt, general direction?

@PetrDlouhy
Copy link
Collaborator

@ecederstrand I finished this and merged in #76, so I am closing this.

@PetrDlouhy PetrDlouhy closed this Aug 30, 2018
@ecederstrand ecederstrand deleted the patch-1 branch August 31, 2018 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants