Skip to content

Commit

Permalink
Fixes netbox-community#1051: Upgraded django-rest-swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Apr 6, 2017
1 parent 02b1ef2 commit 0e5601a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion netbox/netbox/urls.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from rest_framework_swagger.views import get_swagger_view

from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
Expand All @@ -7,6 +9,7 @@


handler500 = handle_500
swagger_view = get_swagger_view(title='NetBox API')

_patterns = [

Expand All @@ -31,7 +34,7 @@
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/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')),

# Error testing
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ <h4><i class="fa fa-exclamation-triangle"></i> Maintenance Mode</h4>
<div class="col-xs-4 text-right">
<p class="text-muted">
<i class="fa fa-fw fa-book text-primary"></i> <a href="http://netbox.readthedocs.io/" target="_blank">Docs</a> &middot;
<i class="fa fa-fw fa-cloud text-primary"></i> <a href="{% url 'django.swagger.base.view' %}">API</a> &middot;
<i class="fa fa-fw fa-cloud text-primary"></i> <a href="{% url 'api_docs' %}">API</a> &middot;
<i class="fa fa-fw fa-code text-primary"></i> <a href="https://github.com/digitalocean/netbox">Code</a> &middot;
<i class="fa fa-fw fa-support text-primary"></i> <a href="https://github.com/digitalocean/netbox/wiki">Help</a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Django>=1.10,<1.11
django-debug-toolbar>=1.6
django-filter>=1.0.1
django-mptt==0.8.7
django-rest-swagger==0.3.10
django-rest-swagger>=2.1.0
django-tables2>=1.2.5
djangorestframework>=3.5.0
graphviz>=0.4.10
Expand Down

0 comments on commit 0e5601a

Please sign in to comment.