From d74d13450c34246bf03797b5d38fc678a1606002 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 22 Feb 2019 04:02:52 -0400 Subject: [PATCH] Use underscore in API resource for uniformity Signed-off-by: Roberto Rosario --- mayan/apps/common/serializers.py | 2 +- mayan/apps/common/tests/test_api.py | 2 +- mayan/apps/common/urls.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mayan/apps/common/serializers.py b/mayan/apps/common/serializers.py index 7ebe538487..9796dce2c4 100644 --- a/mayan/apps/common/serializers.py +++ b/mayan/apps/common/serializers.py @@ -10,7 +10,7 @@ class ContentTypeSerializer(serializers.HyperlinkedModelSerializer): extra_kwargs = { 'url': { 'lookup_url_kwarg': 'content_type_id', - 'view_name': 'rest_api:content-type-detail' + 'view_name': 'rest_api:content_type-detail' } } fields = ('app_label', 'id', 'model', 'url') diff --git a/mayan/apps/common/tests/test_api.py b/mayan/apps/common/tests/test_api.py index 3200e69b7d..e6617c48cf 100644 --- a/mayan/apps/common/tests/test_api.py +++ b/mayan/apps/common/tests/test_api.py @@ -13,7 +13,7 @@ class CommonAPITestCase(BaseAPITestCase): auto_login_user = False def test_content_type_list_view(self): - response = self.get(viewname='rest_api:content-type-list') + response = self.get(viewname='rest_api:content_type-list') self.assertEqual(response.status_code, 200) def _request_template_detail_view(self): diff --git a/mayan/apps/common/urls.py b/mayan/apps/common/urls.py index ca9d2db079..0cfd664b93 100644 --- a/mayan/apps/common/urls.py +++ b/mayan/apps/common/urls.py @@ -68,7 +68,7 @@ urlpatterns += [ api_router_entries = ( { 'prefix': r'content_types', 'viewset': ContentTypeAPIViewSet, - 'basename': 'content-type' + 'basename': 'content_type' }, { 'prefix': r'templates', 'viewset': TemplateAPIViewSet,