from django.urls import path, re_path from .views import auth from .views import index from .views import analytics from .views import admin from .views import sso from .views import upload from .views import prometheus from .views import wechat from .views import captcha login_react_view = auth.LoginView.as_view() signup_react_view = auth.LoginView.as_view() forget_react_view = auth.ReactView.as_view() urlpatterns = [ path('', index.IndexView.as_view(), name='index'), path('sso/sync-cookie', sso.SyncCookieView.as_view(), name='sso-sync-cookie'), path('_/sso/asktug/session/sso', sso.AskTUGLoginView.as_view(), name='asktug-login-redirect'), path('_sso_set_cookie.html', sso.SsoSetCookieTemplateView.as_view(), name='set-cookie-html'), path('_sso_set_cookie', sso.SsoSetCookieView.as_view(), name='set-cookie'), path('update-phone', sso.UpdatePhoneView.as_view(), name='update-phone'), path('userinfo', auth.UserinfoView.as_view(), name='userinfo'), path('login', login_react_view, name='login'), path('login/nopassword', auth.login_nopassword_view, name='login-nopassword'), path('register', signup_react_view, name='signup'), path('reset-password', forget_react_view, name='foget'), path('logout', auth.LogoutView.as_view(), name='logout'), path('monitoring/metrics', prometheus.MetricsExporterView.as_view(), name='prometheus-metrics-exporter'), ] urlpatterns += [ path('MP_verify_pdxQqtfOWeIpp4u4.txt', wechat.MPVerifyView.as_view(), name='wechat-mp-verify'), path('wechat/login', wechat.WechatLoginView.as_view(), name='wechat-login'), path('wechat/login/callback', wechat.WechatLoginCallbackView.as_view(), name='wechat-login-callback'), path('social-auth/add-phone', wechat.SocialAuthAddPhoneView.as_view(), name='social-auth-add-phone'), path('social-auth/cofirm-bindding-exists-account', wechat.SocialAuthConfirmBindingExistsAccountView.as_view(), name='social-auth-cofirm-bindding-exists-account'), ] urlpatterns += [ path('manage', admin.AdminVuePageView.as_view(), name='admin-index-view'), ] urlpatterns += [ path('_analytics/event', analytics.EventView.as_view()) ] urlpatterns += [ path('captcha/image/', captcha.CaptchaImageView.as_view(), name='captcha-image'), ] urlpatterns += [ re_path(r'^_/uploads/(?P.+)$', upload.UploadView.as_view(), name='upload'), ]