增加已经写好的 admin 的模板
This commit is contained in:
@@ -31,8 +31,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'hzfp^8mbgapc&x%$#xv)0=t8s7_ilingw(q3!@h&2fty6v6fxz'
|
||||
|
||||
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
@@ -103,7 +101,7 @@ USE_TZ = True
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static/release/"),)
|
||||
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static/src/"),)
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
os.path.join(BASE_DIR, "template"),
|
||||
|
||||
@@ -6,12 +6,14 @@ from django.views.generic import TemplateView
|
||||
from account.views import UserLoginAPIView
|
||||
|
||||
urlpatterns = [
|
||||
url("^$", TemplateView.as_view(template_name="utils/index.html"), name="index_page"),
|
||||
url(r'^docs/', include('rest_framework_swagger.urls')),
|
||||
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^admin/$', TemplateView.as_view(template_name="admin/index.html"), name="admin_index_page"),
|
||||
url(r'^login/$', TemplateView.as_view(template_name="account/login.html"), name="user_login_page"),
|
||||
url(r'^api/login/$', UserLoginAPIView.as_view(), name="login_api"),
|
||||
url(r'^api/login/$', UserLoginAPIView.as_view(), name="user_login_api"),
|
||||
url(r'^problem/(?P<problem_id>\d+)/$', "problem.views.problem_page", name="problem_page"),
|
||||
|
||||
url(r'^admin/contest/$', TemplateView.as_view(template_name="admin/add_contest.html"), name="add_contest_page"),
|
||||
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user