示例#1
0
    url(r'^group/(?P<group_id>\d+)/applications/$', "group.views.application_list_page", name="group_application_page"),
    url(r'^group/application/(?P<request_id>\d+)/$', "group.views.application_page", name="group_application"),

    url(r'^about/$', TemplateView.as_view(template_name="utils/about.html"), name="about_page"),
    url(r'^help/$', TemplateView.as_view(template_name="utils/help.html"), name="help_page"),

    url(r'^api/submission/share/$', SubmissionShareAPIView.as_view(), name="submission_share_api"),

    url(r'^captcha/$', "utils.captcha.views.show_captcha", name="show_captcha"),

    url(r'^api/contest/time/$', ContestTimeAPIView.as_view(), name="contest_time_api_view"),
    url(r'^api/admin/rejudge/$', SubmissionRejudgeAdminAPIView.as_view(), name="submission_rejudge_api"),

    url(r'^user/(?P<username>.+)/$', "account.views.user_index_page"),

    url(r'^api/apply_reset_password/$', ApplyResetPasswordAPIView.as_view(), name="apply_reset_password_api"),
    url(r'^api/reset_password/$', ResetPasswordAPIView.as_view(), name="apply_reset_password_api"),
    url(r'^account/settings/$', TemplateView.as_view(template_name="oj/account/settings.html"),
        name="account_setting_page"),
    url(r'^account/settings/avatar/$', TemplateView.as_view(template_name="oj/account/avatar.html"),
        name="avatar_settings_page"),
    url(r'^account/sso/$', SSOAPIView.as_view(), name="sso_api"),
    url(r'^api/account/userprofile/$', UserProfileAPIView.as_view(), name="userprofile_api"),
    url(r'^reset_password/$', TemplateView.as_view(template_name="oj/account/apply_reset_password.html"), name="apply_reset_password_page"),
    url(r'^reset_password/t/(?P<token>\w+)/$', "account.views.reset_password_page", name="reset_password_page"),
    url(r'^api/two_factor_auth/$', TwoFactorAuthAPIView.as_view(), name="two_factor_auth_api"),
    url(r'^two_factor_auth/$', TemplateView.as_view(template_name="oj/account/two_factor_auth.html"), name="two_factor_auth_page"),
    url(r'^rank/(?P<page>\d+)/$', "account.views.user_rank_page", name="user_rank_page"),
    url(r'^rank/$', "account.views.user_rank_page", name="user_rank_page"),
]
示例#2
0
        TemplateView.as_view(template_name="utils/about.html"),
        name="about_page"),
    url(r'^help/$',
        TemplateView.as_view(template_name="utils/help.html"),
        name="help_page"),
    url(r'^api/submission/share/$',
        SubmissionShareAPIView.as_view(),
        name="submission_share_api"),
    url(r'^captcha/$', "utils.captcha.views.show_captcha",
        name="show_captcha"),
    url(r'^api/contest/time/$',
        ContestTimeAPIView.as_view(),
        name="contest_time_api_view"),
    url(r'^api/admin/rejudge/$',
        SubmissionRejudgeAdminAPIView.as_view(),
        name="submission_rejudge_api"),
    url(r'^user/(?P<username>.+)/$', "account.views.user_index_page"),
    url(r'^api/reset_password/$',
        ApplyResetPasswordAPIView.as_view(),
        name="apply_reset_password_api"),
    url(r'^account/settings/$',
        TemplateView.as_view(template_name="oj/account/settings.html"),
        name="account_setting_page"),
    url(r'^account/settings/avatar/$',
        TemplateView.as_view(template_name="oj/account/avatar.html"),
        name="avatar_settings_page"),
    url(r'^account/sso/$', SSOAPIView.as_view(), name="sso_api"),
]

if settings.DEBUG:
    urlpatterns.append(url(r'^docs/', include('rest_framework_swagger.urls')))
示例#3
0
    url(r'^groups/$', "group.views.group_list_page", name="group_list_page"),
    url(r'^groups/(?P<page>\d+)/$', "group.views.group_list_page", name="group_list_page"),
    url(r'^group/(?P<group_id>\d+)/$', "group.views.group_page", name="group_page"),
    url(r'^group/(?P<group_id>\d+)/applications/$', "group.views.application_list_page", name="group_application_page"),
    url(r'^group/application/(?P<request_id>\d+)/$', "group.views.application_page", name="group_application"),

    url(r'^about/$', TemplateView.as_view(template_name="utils/about.html"), name="about_page"),
    url(r'^help/$', TemplateView.as_view(template_name="utils/help.html"), name="help_page"),

    url(r'^api/submission/share/$', SubmissionShareAPIView.as_view(), name="submission_share_api"),

    url(r'^captcha/$', "utils.captcha.views.show_captcha", name="show_captcha"),

    url(r'^api/contest/time/$', ContestTimeAPIView.as_view(), name="contest_time_api_view"),
    url(r'^api/admin/rejudge/$', SubmissionRejudgeAdminAPIView.as_view(), name="submission_rejudge_api"),

    url(r'^user/(?P<username>.+)/$', "account.views.user_index_page"),

    url(r'^api/apply_reset_password/$', ApplyResetPasswordAPIView.as_view(), name="apply_reset_password_api"),
    url(r'^api/reset_password/$', ResetPasswordAPIView.as_view(), name="apply_reset_password_api"),
    url(r'^account/settings/$', TemplateView.as_view(template_name="oj/account/settings.html"), name="account_setting_page"),
    url(r'^account/settings/avatar/$', TemplateView.as_view(template_name="oj/account/avatar.html"), name="avatar_settings_page"),
    url(r'^account/sso/$', SSOAPIView.as_view(), name="sso_api"),
    url(r'^api/account/userprofile/$', UserProfileAPIView.as_view(), name="userprofile_api"),
    url(r'^reset_password/$', TemplateView.as_view(template_name="oj/account/apply_reset_password.html"), name="apply_reset_password_page"),
     url(r'^reset_password/t/(?P<token>\w+)/$', "account.views.reset_password_page", name="reset_password_page")
]


if settings.DEBUG:
    urlpatterns.append(url(r'^docs/', include('rest_framework_swagger.urls')))