Move get_url_name to base ViewSet

pull/3545/merge
Matt Westcott 2017-06-19 12:12:37 +01:00
rodzic 560e430d0a
commit b77848de20
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -11,3 +11,6 @@ class ViewSet(object):
def get_urlpatterns(self):
return []
def get_url_name(self, view_name):
return self.name + ':' + view_name

Wyświetl plik

@ -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)