kopia lustrzana https://github.com/wagtail/wagtail
Move get_url_name to base ViewSet
rodzic
560e430d0a
commit
b77848de20
|
@ -11,3 +11,6 @@ class ViewSet(object):
|
|||
|
||||
def get_urlpatterns(self):
|
||||
return []
|
||||
|
||||
def get_url_name(self, view_name):
|
||||
return self.name + ':' + view_name
|
||||
|
|
|
@ -18,9 +18,6 @@ class ModelViewSet(ViewSet):
|
|||
edit_view_class = generic.EditView
|
||||
delete_view_class = generic.DeleteView
|
||||
|
||||
def get_url_name(self, view_name):
|
||||
return self.name + ':' + view_name
|
||||
|
||||
@property
|
||||
def permission_policy(self):
|
||||
return ModelPermissionPolicy(self.model)
|
||||
|
|
Ładowanie…
Reference in New Issue