mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 22:04:48 +03:00
Do not use schmea in tests if coreapi is not installed
This commit is contained in:
parent
e78753dd0c
commit
84bb5ea4ff
|
@ -31,7 +31,7 @@ class ExampleViewSet(ModelViewSet):
|
||||||
serializer_class = ExampleSerializer
|
serializer_class = ExampleSerializer
|
||||||
|
|
||||||
|
|
||||||
router = DefaultRouter(schema_title='Example API')
|
router = DefaultRouter(schema_title='Example API' if coreapi else None)
|
||||||
router.register('example', ExampleViewSet, base_name='example')
|
router.register('example', ExampleViewSet, base_name='example')
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^', include(router.urls))
|
url(r'^', include(router.urls))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user