Esempio n. 1
0
    url(r'^admin/contest/$', TemplateView.as_view(template_name="admin/contest/add_contest.html"),
        name="add_contest_page"),
    url(r'^admin/template/(?P<template_dir>\w+)/(?P<template_name>\w+).html$', AdminTemplateView.as_view(),
        name="admin_template"),

    url(r'^login/$', TemplateView.as_view(template_name="oj/account/login.html"), name="user_login_page"),
    url(r'^logout/$', "account.views.logout", name="user_logout_api"),
    url(r'^register/$', TemplateView.as_view(template_name="oj/account/register.html"),
        name="user_register_page"),
    url(r'^change_password/$', TemplateView.as_view(template_name="oj/account/change_password.html"),
        name="user_change_password_page"),
    url(r'^announcement/(?P<announcement_id>\d+)/$', "announcement.views.announcement_page",
        name="announcement_page"),

    url(r'^api/user/$', UserInfoAPIView.as_view(), name="user_info_api"),
    url(r'^api/login/$', UserLoginAPIView.as_view(), name="user_login_api"),
    url(r'^api/register/$', UserRegisterAPIView.as_view(), name="user_register_api"),
    url(r'^api/change_password/$', UserChangePasswordAPIView.as_view(), name="user_change_password_api"),
    url(r'^api/username_check/$', UsernameCheckAPIView.as_view(), name="username_check_api"),
    url(r'^api/email_check/$', EmailCheckAPIView.as_view(), name="email_check_api"),
    url(r'^api/contest/password/$', ContestPasswordVerifyAPIView.as_view(), name="contest_password_verify_api"),
    url(r'^api/contest/submission/$', ContestSubmissionAPIView.as_view(), name="contest_submission_api"),
    url(r'^api/submission/$', SubmissionAPIView.as_view(), name="submission_api"),
    url(r'^api/group_join/$', JoinGroupAPIView.as_view(), name="group_join_api"),
    

    url(r'^api/admin/upload_image/$', SimditorImageUploadAPIView.as_view(), name="simditor_upload_image"),
    url(r'^api/admin/announcement/$', AnnouncementAdminAPIView.as_view(), name="announcement_admin_api"),
    url(r'^api/admin/contest/$', ContestAdminAPIView.as_view(), name="contest_admin_api"),
    url(r'^api/admin/user/$', UserAdminAPIView.as_view(), name="user_admin_api"),
    url(r'^api/admin/group/$', GroupAdminAPIView.as_view(), name="group_admin_api"),
Esempio n. 2
0
     name="admin_template"),
 url(r'^login/$',
     TemplateView.as_view(template_name="oj/account/login.html"),
     name="user_login_page"),
 url(r'^logout/$', "account.views.logout", name="user_logout_api"),
 url(r'^register/$',
     TemplateView.as_view(template_name="oj/account/register.html"),
     name="user_register_page"),
 url(r'^change_password/$',
     TemplateView.as_view(template_name="oj/account/change_password.html"),
     name="user_change_password_page"),
 url(r'^announcement/(?P<announcement_id>\d+)/$',
     "announcement.views.announcement_page",
     name="announcement_page"),
 url(r'^api/user/$', UserInfoAPIView.as_view(), name="user_info_api"),
 url(r'^api/login/$', UserLoginAPIView.as_view(), name="user_login_api"),
 url(r'^api/register/$',
     UserRegisterAPIView.as_view(),
     name="user_register_api"),
 url(r'^api/change_password/$',
     UserChangePasswordAPIView.as_view(),
     name="user_change_password_api"),
 url(r'^api/username_check/$',
     UsernameCheckAPIView.as_view(),
     name="username_check_api"),
 url(r'^api/email_check/$',
     EmailCheckAPIView.as_view(),
     name="email_check_api"),
 url(r'^api/contest/password/$',
     ContestPasswordVerifyAPIView.as_view(),
     name="contest_password_verify_api"),
Esempio n. 3
0
from django.urls import path, include
from account.views import RegisterApiView, UserLoginAPIView

urlpatterns = [
    path('register', RegisterApiView.as_view(), name='register'),
    path('login', UserLoginAPIView.as_view(), name='login'),
]