-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
179 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,14 @@ | |
EMAIL_HOST_PASSWORD = 'qikuedu' | ||
DEFAULT_FROM_EMAIL = 'zzy0371 <[email protected]>' | ||
|
||
# 缓存 | ||
CACHES = { | ||
"default": { | ||
"BACKEND": "redis_cache.cache.RedisCache", | ||
"LOCATION": "localhost:6379", | ||
'TIMEOUT': 60, | ||
}, | ||
} | ||
|
||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Click==7.0 | ||
Django==2.2 | ||
django-haystack==2.8.1 | ||
django-redis-cache==2.0.0 | ||
django-redis-sessions==0.6.1 | ||
django-tinymce==2.8.0 | ||
Flask==1.0.2 | ||
itsdangerous==1.1.0 | ||
jieba==0.39 | ||
Jinja2==2.10.1 | ||
Markdown==3.1 | ||
MarkupSafe==1.1.1 | ||
mysqlclient==1.4.2.post1 | ||
Pillow==6.0.0 | ||
PyMySQL==0.9.3 | ||
pytz==2019.1 | ||
redis==3.2.1 | ||
sqlparse==0.3.0 | ||
Werkzeug==0.15.2 | ||
Whoosh==2.7.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
}, | ||
success: function (data) { | ||
console.log("+++") | ||
console.log(data) | ||
$('#userinfo').text(data); | ||
} | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>图表显示</title> | ||
<style> | ||
div{ | ||
float: left; | ||
} | ||
</style> | ||
<script src="https://echarts.baidu.com/examples/vendors/echarts/echarts.min.js"></script> | ||
</head> | ||
<body> | ||
|
||
<div id="main" style="width: 600px;height:400px;"></div> | ||
<div id="main2" style="width: 600px;height:400px;"></div> | ||
<div id="main3" style="width: 600px;height:400px;"></div> | ||
<script type="text/javascript"> | ||
// 基于准备好的dom,初始化echarts实例 | ||
var myChart1 = echarts.init(document.getElementById('main')); | ||
var myChart2 = echarts.init(document.getElementById('main2')); | ||
|
||
// 指定图表的配置项和数据 | ||
var option1 = { | ||
title: { | ||
text: 'ECharts 入门示例' | ||
}, | ||
tooltip: {}, | ||
legend: { | ||
data:['销量'] | ||
}, | ||
xAxis: { | ||
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"] | ||
}, | ||
yAxis: {}, | ||
series: [{ | ||
name: '销量', | ||
type: 'bar', | ||
data: [5, 20, 36, 10, 10, 20] | ||
}] | ||
}; | ||
|
||
// 使用刚指定的配置项和数据显示图表。 | ||
myChart1.setOption(option1); | ||
|
||
|
||
|
||
|
||
var dataCount = 5e5; | ||
var data = generateData(dataCount); | ||
|
||
var option2 = { | ||
title: { | ||
text: echarts.format.addCommas(dataCount) + ' Data', | ||
left: 10 | ||
}, | ||
toolbox: { | ||
feature: { | ||
dataZoom: { | ||
yAxisIndex: false | ||
}, | ||
saveAsImage: { | ||
pixelRatio: 2 | ||
} | ||
} | ||
}, | ||
tooltip: { | ||
trigger: 'axis', | ||
axisPointer: { | ||
type: 'shadow' | ||
} | ||
}, | ||
grid: { | ||
bottom: 90 | ||
}, | ||
dataZoom: [{ | ||
type: 'inside' | ||
}, { | ||
type: 'slider' | ||
}], | ||
xAxis: { | ||
data: data.categoryData, | ||
silent: false, | ||
splitLine: { | ||
show: false | ||
}, | ||
splitArea: { | ||
show: false | ||
} | ||
}, | ||
yAxis: { | ||
splitArea: { | ||
show: false | ||
} | ||
}, | ||
series: [{ | ||
type: 'bar', | ||
data: data.valueData, | ||
// Set `large` for large data amount | ||
large: true | ||
}] | ||
}; | ||
|
||
function generateData(count) { | ||
var baseValue = Math.random() * 1000; | ||
var time = +new Date(2011, 0, 1); | ||
var smallBaseValue; | ||
|
||
function next(idx) { | ||
smallBaseValue = idx % 30 === 0 | ||
? Math.random() * 700 | ||
: (smallBaseValue + Math.random() * 500 - 250); | ||
baseValue += Math.random() * 20 - 10; | ||
return Math.max( | ||
0, | ||
Math.round(baseValue + smallBaseValue) + 3000 | ||
); | ||
} | ||
|
||
var categoryData = []; | ||
var valueData = []; | ||
|
||
for (var i = 0; i < count; i++) { | ||
categoryData.push(echarts.format.formatTime('yyyy-MM-dd\nhh:mm:ss', time)); | ||
valueData.push(next(i).toFixed(2)); | ||
time += 1000; | ||
} | ||
|
||
return { | ||
categoryData: categoryData, | ||
valueData: valueData | ||
}; | ||
} | ||
myChart2.setOption(option2); | ||
</script> | ||
|
||
|
||
|
||
|
||
</body> | ||
</html> |