mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
1. 更新启动脚本
2. 优化更新界面 3. 优化项目结构 4. 添加站点图标
This commit is contained in:
@@ -3,7 +3,6 @@ import os
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
|
||||
import markdown
|
||||
from django.http import JsonResponse
|
||||
from django.shortcuts import render
|
||||
|
||||
@@ -127,10 +126,10 @@ def do_update(request):
|
||||
|
||||
|
||||
def restart_container(request):
|
||||
scraper = pt_spider.get_scraper()
|
||||
res = scraper.get('https://gitee.com/ngfchl/ptools/raw/master/update.md')
|
||||
update_notes = markdown.markdown(res.text, extensions=['tables'])
|
||||
# scraper = pt_spider.get_scraper()
|
||||
# res = scraper.get('https://gitee.com/ngfchl/ptools/raw/master/update.md')
|
||||
# update_notes = markdown.markdown(res.text, extensions=['tables'])
|
||||
# print(update_notes)
|
||||
return render(request, 'auto_pt/restart.html', context={
|
||||
'update_notes': update_notes
|
||||
})
|
||||
return render(request, 'auto_pt/restart.html',
|
||||
# context={'update_notes': update_notes}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user