2015-06-26 07:59:53 +00:00
|
|
|
# coding=utf-8
|
|
|
|
from django.conf.urls import include, url
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.views.generic import TemplateView
|
|
|
|
|
2015-06-29 04:43:17 +00:00
|
|
|
from account.views import UserLoginAPIView
|
|
|
|
|
2015-06-26 07:59:53 +00:00
|
|
|
urlpatterns = [
|
2015-08-02 01:47:50 +00:00
|
|
|
url("^$", TemplateView.as_view(template_name="utils/index.html"), name="index_page"),
|
2015-06-29 04:43:17 +00:00
|
|
|
url(r'^docs/', include('rest_framework_swagger.urls')),
|
2015-08-02 01:47:50 +00:00
|
|
|
url(r'^admin/$', TemplateView.as_view(template_name="admin/index.html"), name="admin_index_page"),
|
2015-06-29 04:43:17 +00:00
|
|
|
url(r'^login/$', TemplateView.as_view(template_name="account/login.html"), name="user_login_page"),
|
2015-07-31 15:23:15 +00:00
|
|
|
url(r'^api/login/$', UserLoginAPIView.as_view(), name="login_api"),
|
2015-06-29 04:43:17 +00:00
|
|
|
url(r'^api/login/$', UserLoginAPIView.as_view(), name="user_login_api"),
|
2015-08-02 00:50:19 +00:00
|
|
|
url(r'^problem/(?P<problem_id>\d+)/$', "problem.views.problem_page", name="problem_page"),
|
2015-06-29 04:43:17 +00:00
|
|
|
|
2015-08-02 01:47:50 +00:00
|
|
|
url(r'^admin/contest/$', TemplateView.as_view(template_name="admin/add_contest.html"), name="add_contest_page"),
|
|
|
|
|
2015-06-26 07:59:53 +00:00
|
|
|
]
|