mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 17:36:49 +01:00
Remove the ability to set snippets viewset via admin_viewset attribute on the model
This commit is contained in:
parent
a7249a851f
commit
f3b8a7df27
@ -52,8 +52,8 @@ def register_snippet(model, viewset=None):
|
||||
model.get_admin_url_namespace = get_admin_url_namespace
|
||||
|
||||
if viewset is None:
|
||||
viewset = getattr(model, "admin_viewset", SnippetViewSet)
|
||||
if isinstance(viewset, str):
|
||||
viewset = SnippetViewSet
|
||||
elif isinstance(viewset, str):
|
||||
viewset = import_string(viewset)
|
||||
|
||||
admin_viewset = viewset(
|
||||
|
Loading…
Reference in New Issue
Block a user