diff --git a/rest_framework_docs/views.py b/rest_framework_docs/views.py index f8b81a1..04074cc 100644 --- a/rest_framework_docs/views.py +++ b/rest_framework_docs/views.py @@ -10,7 +10,7 @@ class DRFDocsView(TemplateView): def get_context_data(self, **kwargs): settings = DRFSettings().settings - if not settings["HIDE_DOCS"]: + if settings["HIDE_DOCS"]: raise Http404("Django Rest Framework Docs are hidden. Check your settings.") context = super(DRFDocsView, self).get_context_data(**kwargs) diff --git a/tests/tests.py b/tests/tests.py index 8a4b92b..afb58d0 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -16,7 +16,7 @@ def test_settings_module(self): settings = DRFSettings() - self.assertEqual(settings.get_setting("HIDE_DOCS"), True) + self.assertEqual(settings.get_setting("HIDE_DOCS"), False) self.assertEqual(settings.get_setting("TEST"), None) def test_index_view_with_endpoints(self):