Merge branch 'dev' into dev-sxw
Nothing~
This commit is contained in:
@@ -5,7 +5,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# 下面是需要自己修改的
|
||||
LOG_PATH = "LOG/"
|
||||
LOG_PATH = "log/"
|
||||
|
||||
# 注意这是web 服务器访问的地址,判题端访问的地址不一定一样,因为可能不在一台机器上
|
||||
DATABASES = {
|
||||
@@ -18,7 +18,7 @@ DATABASES = {
|
||||
'NAME': 'oj_submission',
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'HOST': "121.42.32.129",
|
||||
'POST': 3306,
|
||||
'PORT': 3306,
|
||||
'USER': 'root',
|
||||
'PASSWORD': 'mypwd'
|
||||
}
|
||||
@@ -29,5 +29,5 @@ DEBUG = True
|
||||
# 同理 这是 web 服务器的上传路径
|
||||
TEST_CASE_DIR = os.path.join(BASE_DIR, 'test_case/')
|
||||
|
||||
DATABASE_ROUTERS = ['oj.db_router.DBRouter']
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
@@ -1 +1,37 @@
|
||||
# coding=utf-8
|
||||
import os
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# 下面是需要自己修改的
|
||||
LOG_PATH = "/var/log/oj/"
|
||||
|
||||
# 注意这是web 服务器访问的地址,判题端访问的地址不一定一样,因为可能不在一台机器上
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': "oj",
|
||||
'CONN_MAX_AGE': 0.3,
|
||||
'HOST': '127.0.0.1',
|
||||
'PORT': 3306,
|
||||
'USER': 'root',
|
||||
'PASSWORD': 'mypwd'
|
||||
},
|
||||
'submission': {
|
||||
'NAME': 'oj_submission',
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'HOST': "127.0.0.1",
|
||||
'PORT': 3306,
|
||||
'USER': 'root',
|
||||
'PASSWORD': 'mypwd'
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG = True
|
||||
|
||||
# 同理 这是 web 服务器的上传路径
|
||||
TEST_CASE_DIR = '/root/test_case/'
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
|
||||
@@ -14,15 +14,13 @@ https://docs.djangoproject.com/en/1.8/ref/settings/
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import os
|
||||
|
||||
# todo 判断运行环境
|
||||
# 判断运行环境
|
||||
ENV = os.environ.get("oj_env", "local")
|
||||
|
||||
if ENV == "local":
|
||||
from .local_settings import *
|
||||
elif ENV == "server":
|
||||
from .server_settings import *
|
||||
elif ENV == "daocloud":
|
||||
from .daocloud_settings import *
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
@@ -33,7 +31,7 @@ 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 = []
|
||||
|
||||
|
||||
|
||||
# Application definition
|
||||
@@ -171,3 +169,5 @@ LOGGING = {
|
||||
REST_FRAMEWORK = {
|
||||
'TEST_REQUEST_DEFAULT_FORMAT': 'json'
|
||||
}
|
||||
|
||||
DATABASE_ROUTERS = ['oj.db_router.DBRouter']
|
||||
@@ -8,71 +8,65 @@
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/fullpage/jquery.fullPage.css">
|
||||
<style>
|
||||
html, textarea, input, option, select, button {
|
||||
font: 1em "Helvetica Neue", Helvetica, "Lantinghei SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑",
|
||||
"STHeiti", "WenQuanYi Micro Hei", SimSun, sans-serif;
|
||||
color: #FFF;
|
||||
font: 1em "Helvetica Neue", Helvetica, "Lantinghei SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑",
|
||||
"STHeiti", "WenQuanYi Micro Hei", SimSun, sans-serif;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #FFF;
|
||||
text-decoration: none;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#header {
|
||||
position: fixed;
|
||||
height: 30px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
z-index: 10;
|
||||
padding: 20px 20px 0 20px;
|
||||
position: fixed;
|
||||
height: 30px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
background: transparent;
|
||||
z-index: 10;
|
||||
padding: 20px 20px 0 20px;
|
||||
}
|
||||
|
||||
#name {
|
||||
font-size: 45px;
|
||||
margin-right: 20px;
|
||||
font-size: 45px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
#nav-left{
|
||||
display: inline;
|
||||
position:relative;
|
||||
float: right;
|
||||
margin-right: 28px;
|
||||
}
|
||||
.section {
|
||||
position: relative;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.section h1 {
|
||||
font-size: 60px;
|
||||
font-size: 60px;
|
||||
}
|
||||
|
||||
.section h3 {
|
||||
font-size: 30px;
|
||||
font-weight: normal;
|
||||
font-size: 30px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.bottom-pointer {
|
||||
top: auto;
|
||||
bottom: 20px;
|
||||
position: absolute;
|
||||
left: 48%;
|
||||
top: auto;
|
||||
bottom: 20px;
|
||||
position: absolute;
|
||||
left: 48%;
|
||||
}
|
||||
|
||||
.index-section-text {
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.section-text {
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.icon {
|
||||
max-height: 300px;
|
||||
max-width: 300px;
|
||||
max-height: 300px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -103,20 +97,7 @@
|
||||
<a href="/submissions/">提交</a>
|
||||
<a href="/contests/">比赛</a>
|
||||
<a href="/groups/">小组</a>
|
||||
<a href="/about/">关于</a>
|
||||
<div id="nav-left">
|
||||
{% if request.user.is_authenticated %}
|
||||
<a href="#">{{ request.user.username }}</a>
|
||||
<a href="/logout/">退出</a>
|
||||
{% else %}
|
||||
<a href="/login/">
|
||||
登录
|
||||
</a>
|
||||
<a href="/register/">
|
||||
注册
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<a href="/about/">关于</a>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -124,9 +105,9 @@
|
||||
<div id="fullpage">
|
||||
<div class="section" id="section0">
|
||||
<div class="index-section-text animated bounceInUp">
|
||||
<h1>青岛大学在线评测平台</h1>
|
||||
<h1>青岛大学 Online Judge</h1>
|
||||
|
||||
<h3>全新面貌,新的开始~</h3>
|
||||
<h3>新的面貌,新的开始~</h3>
|
||||
</div>
|
||||
<div class="bottom-pointer">↓继续滚动~</div>
|
||||
</div>
|
||||
@@ -156,7 +137,7 @@
|
||||
<div class="section-text">
|
||||
<img class="icon" id="img3" src="/static/img/index/m.png">
|
||||
|
||||
<h1>自由举办小组赛</h1>
|
||||
<h1>自由举办小组赛(10月上线)</h1>
|
||||
|
||||
<h3>内部比赛,日常作业,期末考试,通通搞定</h3>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user