Skip to content

Commit b774268

Browse files
author
Maxence
committed
Add '-' to the url patten
1 parent e2744a0 commit b774268

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

demo/project/settings.py

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343

4444
'project.accounts',
4545
'project.organisations',
46-
4746
)
4847

4948
MIDDLEWARE_CLASSES = (

rest_framework_docs/urls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# Url to view the API Docs
66
url(r'^$', DRFDocsView.as_view(), name='drfdocs'),
77
# Url to view the API Docs with a specific namespace or app_name
8-
url(r'^(?P<filter_param>\w+)/$', DRFDocsView.as_view(), name='drfdocs-filter'),
8+
url(r'^(?P<filter_param>[\w-]+)/$', DRFDocsView.as_view(), name='drfdocs-filter'),
99
]

runtests.py

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def run_tests_coverage():
5353
cov.report()
5454
cov.html_report(directory='covhtml')
5555

56+
5657
exit_on_failure(flake8_main(FLAKE8_ARGS))
5758
exit_on_failure(run_tests_eslint())
5859
exit_on_failure(run_tests_coverage())

tests/tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,6 @@ def test_index_view_with_non_existent_namespace_or_app_name(self):
121121
"""
122122
Should load the drf docs view with no endpoint.
123123
"""
124-
response = self.client.get(reverse('drfdocs-filter', args=['non_existent_ns_or_app_name']))
124+
response = self.client.get(reverse('drfdocs-filter', args=['non-existent-ns-or-app-name']))
125125
self.assertEqual(response.status_code, 200)
126126
self.assertEqual(len(response.context["endpoints"]), 0)

0 commit comments

Comments
 (0)