mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-09-21 16:33:22 +00:00
Accept Merge Request #130 修复比赛顺序问题 : (virusdefender-dev -> dev)
Merge Request: 修复比赛顺序问题 Created By: @virusdefender Accepted By: @virusdefender URL: https://coding.net/u/virusdefender/p/qduoj/git/merge/130
This commit is contained in:
commit
b4224846d0
5
.gitignore
vendored
5
.gitignore
vendored
@ -55,6 +55,9 @@ db.db
|
|||||||
db.sqlite3
|
db.sqlite3
|
||||||
.DS_Store
|
.DS_Store
|
||||||
log/
|
log/
|
||||||
release/
|
static/release/css
|
||||||
|
static/release/js
|
||||||
|
static/release/img
|
||||||
|
build.txt
|
||||||
tmp/
|
tmp/
|
||||||
test_case/
|
test_case/
|
@ -7,7 +7,7 @@ from rest_framework.views import APIView
|
|||||||
|
|
||||||
class AdminTemplateView(APIView):
|
class AdminTemplateView(APIView):
|
||||||
def get(self, request, template_dir, template_name):
|
def get(self, request, template_dir, template_name):
|
||||||
path = settings.TEMPLATE_DIRS[0] + "/admin/" + template_dir + "/" + template_name + ".html"
|
path = settings.TEMPLATES[0]["DIRS"][0] + "/admin/" + template_dir + "/" + template_name + ".html"
|
||||||
try:
|
try:
|
||||||
return HttpResponse(open(path).read(), content_type="text/html")
|
return HttpResponse(open(path).read(), content_type="text/html")
|
||||||
except IOError:
|
except IOError:
|
||||||
|
@ -338,7 +338,7 @@ def contest_list_page(request, page=1):
|
|||||||
所有比赛的列表页
|
所有比赛的列表页
|
||||||
"""
|
"""
|
||||||
# 正常情况
|
# 正常情况
|
||||||
contests = Contest.objects.filter(visible=True)
|
contests = Contest.objects.filter(visible=True).order_by("-create_time")
|
||||||
|
|
||||||
# 搜索的情况
|
# 搜索的情况
|
||||||
keyword = request.GET.get("keyword", None)
|
keyword = request.GET.get("keyword", None)
|
||||||
|
@ -78,7 +78,7 @@ ROOT_URLCONF = 'oj.urls'
|
|||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
'DIRS': [os.path.join(BASE_DIR, 'template')],
|
'DIRS': [os.path.join(BASE_DIR, 'template/src')],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
@ -116,7 +116,7 @@ STATIC_URL = '/static/'
|
|||||||
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static/src/"),)
|
STATICFILES_DIRS = (os.path.join(BASE_DIR, "static/src/"),)
|
||||||
|
|
||||||
TEMPLATE_DIRS = (
|
TEMPLATE_DIRS = (
|
||||||
os.path.join(BASE_DIR, "template"),
|
os.path.join(BASE_DIR, "template/src"),
|
||||||
)
|
)
|
||||||
|
|
||||||
AUTH_USER_MODEL = 'account.User'
|
AUTH_USER_MODEL = 'account.User'
|
||||||
|
3
static/release/fis-conf.js
Normal file
3
static/release/fis-conf.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/**
|
||||||
|
* Created by virusdefender on 8/25/15.
|
||||||
|
*/
|
Loading…
Reference in New Issue
Block a user