1. 更新启动脚本

2. 优化更新界面
3. 优化项目结构
4. 添加站点图标
This commit is contained in:
ngfchl
2022-08-25 12:19:09 +08:00
parent 24bcba7463
commit 0ebaa6fec0
7 changed files with 20 additions and 24 deletions

View File

@@ -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}
)