urls.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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, re_path
  18. from controller import index, beian, AppToApp, DeviceController
  19. from controller import deviceStatus
  20. urlpatterns = [
  21. path('admin/', admin.site.urls),
  22. path('oa2/auth', index.authView.as_view()),
  23. path('oa2/authAnlapus', index.authAnlapusView.as_view()),
  24. path('oa2/authLoocam', index.authLoocamView.as_view()),
  25. path('oa2/authVSees', index.authVSeesView.as_view()),
  26. path('oa2/login', index.loginHandleView.as_view()),
  27. path('oa2/token', index.oa2TokenView.as_view()),
  28. # 搜索设备
  29. path('oa2/discoverydevice', index.oa2DiscoveryDevice.as_view()),
  30. path('oa2/discoveryswitch', index.oa2DiscoverySwitch.as_view()),
  31. path('oa2/rtspStart', index.oa2RtspStartView.as_view()), # 通知摄像头设备推流
  32. path('oa2/powerController', index.powerController.as_view()), # 控制智能插座开关
  33. re_path('device/(?P<operation>.*)', DeviceController.DeviceView.as_view()),
  34. url(r'^deviceStatus/(?P<operation>.*)$', deviceStatus.deviceStatus.as_view()), # 更新设备信息等接口
  35. url(r'^vseesTest/(?P<operation>.*)', index.VesseTest.as_view()), # test
  36. # app to app oauth2验证登录连接
  37. re_path('appToApp/oa2/(?P<operation>.*)', AppToApp.Oa2View.as_view()),
  38. re_path('webrtc/(?P<operation>.*)', index.RtcController.as_view()), # webrtc
  39. # 域名备案网站
  40. re_path('(?P<path>.*)', beian.beianPath),
  41. ]