urls.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. """azoauth URL Configuration
  2. The `urlpatterns` list routes URLs to views. For more information please see:
  3. https://docs.djangoproject.com/en/2.1/topics/http/urls/
  4. Examples:
  5. Function views
  6. 1. Add an import: from my_app import views
  7. 2. Add a URL to urlpatterns: path('', views.home, name='home')
  8. Class-based views
  9. 1. Add an import: from other_app.views import Home
  10. 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
  11. Including another URLconf
  12. 1. Import the include() function: from django.urls import include, path
  13. 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
  14. """
  15. from django.conf.urls import url
  16. from django.contrib import admin
  17. from django.urls import path
  18. from controller import index
  19. from controller import distribution
  20. from controller import deviceStatus
  21. urlpatterns = [
  22. path('admin/', admin.site.urls),
  23. path('oa2/auth', index.authView.as_view()),
  24. path('oa2/login', index.loginHandleView.as_view()),
  25. path('oa2/token', index.oa2TokenView.as_view()),
  26. path('oa2/rtspStart', index.oa2RtspStartView.as_view()),
  27. path('oa2/discoverydevice', index.oa2DiscoveryDevice.as_view()),
  28. #新增停流
  29. path('oa2/stoprtsp', index.testRunSendStop),
  30. #新增设备推流测试
  31. path('oa2/runstream', index.testRunStream),
  32. #测试服务器是否正常接口
  33. path('oa2/test', index.test),
  34. #负载均衡接口test(后期可删)
  35. path('oa2/loadserver', index.loadBalancingServer),
  36. #查询存储alexa连接数
  37. path('distribution/select', distribution.selectConnectNum.as_view()), #查询连接数并返回url
  38. path('distribution/storage', distribution.storageConnectNum.as_view()), #存储连接数
  39. #跟设备状态到alexa网关.
  40. url(r'^deviceStatus/(?P<operation>.*)$', deviceStatus.deviceStatus.as_view()),
  41. ]