python - Django Rest Docs Show Wrong Urls -
i'm using django rest docs describe api built in django rest framework, urls it's displaying incorrect. specifically, prepend /admin/ everything:
these paths should /session-auth/, /session/, etc. don't know why /admin/ being preprended. here's urls.py file:
# urls serving static media , user uploaded media urlpatterns = patterns('', (r'^static/(?p<path>.*)$', 'django.views.static.serve',{'document_root': settings.static_url, 'show_indexes': true}), ) + static(settings.static_url, document_root=settings.static_root) urlpatterns += patterns('myapp.views', #home page (r'^$', 'home'), url(r'^docs/', include('rest_framework_docs.urls')), # refresh locations (r'^admin/refresh-all-locations/$', 'refresh_all_locations'), # admin locations page (r'^admin/all-locations/$', admin.site.admin_view(all_locations)), # admin (r'^admin/', include(admin.site.urls)), ####api urls#### # authenticate user url(r'^session-auth/$', api.session.sessionauth.as_view(), name='authenticate'), # update user password or email url(r'^session/$', api.session.sessiondetail.as_view()), # detail on 1 entity url(r'^entities/(?p<entity_id>[0-9]+)/$', api.entity.entitydetail.as_view()),
Comments
Post a Comment