Use underscore in API resource for uniformity

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-02-22 04:02:52 -04:00
parent b975c75c2f
commit d74d13450c
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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