2015-06-26 15:59:53 +08: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 12:43:17 +08:00
|
|
|
from account.views import UserLoginAPIView
|
|
|
|
|
2015-06-26 15:59:53 +08:00
|
|
|
urlpatterns = [
|
2015-06-29 12:43:17 +08:00
|
|
|
url(r'^docs/', include('rest_framework_swagger.urls')),
|
|
|
|
|
2015-06-26 15:59:53 +08:00
|
|
|
url(r'^admin/', include(admin.site.urls)),
|
2015-06-29 12:43:17 +08:00
|
|
|
url(r'^login/$', TemplateView.as_view(template_name="account/login.html"), name="user_login_page"),
|
2015-07-31 23:23:15 +08:00
|
|
|
url(r'^api/login/$', UserLoginAPIView.as_view(), name="login_api"),
|
2015-06-29 12:43:17 +08:00
|
|
|
url(r'^api/login/$', UserLoginAPIView.as_view(), name="user_login_api"),
|
2015-08-02 08:50:19 +08:00
|
|
|
url(r'^problem/(?P<problem_id>\d+)/$', "problem.views.problem_page", name="problem_page"),
|
2015-06-29 12:43:17 +08:00
|
|
|
|
2015-06-26 15:59:53 +08:00
|
|
|
]
|