mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Fixes #1051: Upgraded django-rest-swagger
This commit is contained in:
parent
78b0072051
commit
f3eee25527
@ -1,3 +1,5 @@
|
|||||||
|
from rest_framework_swagger.views import get_swagger_view
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import include, url
|
from django.conf.urls import include, url
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
@ -7,6 +9,7 @@ from users.views import login, logout
|
|||||||
|
|
||||||
|
|
||||||
handler500 = handle_500
|
handler500 = handle_500
|
||||||
|
swagger_view = get_swagger_view(title='NetBox API')
|
||||||
|
|
||||||
_patterns = [
|
_patterns = [
|
||||||
|
|
||||||
@ -31,7 +34,7 @@ _patterns = [
|
|||||||
url(r'^api/ipam/', include('ipam.api.urls', namespace='ipam-api')),
|
url(r'^api/ipam/', include('ipam.api.urls', namespace='ipam-api')),
|
||||||
url(r'^api/secrets/', include('secrets.api.urls', namespace='secrets-api')),
|
url(r'^api/secrets/', include('secrets.api.urls', namespace='secrets-api')),
|
||||||
url(r'^api/tenancy/', include('tenancy.api.urls', namespace='tenancy-api')),
|
url(r'^api/tenancy/', include('tenancy.api.urls', namespace='tenancy-api')),
|
||||||
url(r'^api/docs/', include('rest_framework_swagger.urls')),
|
url(r'^api/docs/', swagger_view, name='api_docs'),
|
||||||
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||||
|
|
||||||
# Error testing
|
# Error testing
|
||||||
|
@ -294,7 +294,7 @@
|
|||||||
<div class="col-xs-4 text-right">
|
<div class="col-xs-4 text-right">
|
||||||
<p class="text-muted">
|
<p class="text-muted">
|
||||||
<i class="fa fa-fw fa-book text-primary"></i> <a href="http://netbox.readthedocs.io/" target="_blank">Docs</a> ·
|
<i class="fa fa-fw fa-book text-primary"></i> <a href="http://netbox.readthedocs.io/" target="_blank">Docs</a> ·
|
||||||
<i class="fa fa-fw fa-cloud text-primary"></i> <a href="{% url 'django.swagger.base.view' %}">API</a> ·
|
<i class="fa fa-fw fa-cloud text-primary"></i> <a href="{% url 'api_docs' %}">API</a> ·
|
||||||
<i class="fa fa-fw fa-code text-primary"></i> <a href="https://github.com/digitalocean/netbox">Code</a> ·
|
<i class="fa fa-fw fa-code text-primary"></i> <a href="https://github.com/digitalocean/netbox">Code</a> ·
|
||||||
<i class="fa fa-fw fa-support text-primary"></i> <a href="https://github.com/digitalocean/netbox/wiki">Help</a>
|
<i class="fa fa-fw fa-support text-primary"></i> <a href="https://github.com/digitalocean/netbox/wiki">Help</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -4,7 +4,7 @@ Django>=1.10,<1.11
|
|||||||
django-debug-toolbar>=1.6
|
django-debug-toolbar>=1.6
|
||||||
django-filter>=1.0.1
|
django-filter>=1.0.1
|
||||||
django-mptt==0.8.7
|
django-mptt==0.8.7
|
||||||
django-rest-swagger==0.3.10
|
django-rest-swagger>=2.1.0
|
||||||
django-tables2>=1.2.5
|
django-tables2>=1.2.5
|
||||||
djangorestframework>=3.5.0
|
djangorestframework>=3.5.0
|
||||||
graphviz>=0.4.10
|
graphviz>=0.4.10
|
||||||
|
Loading…
Reference in New Issue
Block a user