diff --git a/auto_pt/views.py b/auto_pt/views.py
index 7828b23..71af786 100644
--- a/auto_pt/views.py
+++ b/auto_pt/views.py
@@ -131,6 +131,12 @@ def restart_container(request):
res = scraper.get('https://gitee.com/ngfchl/ptools/raw/master/update.md')
update_notes = markdown.markdown(res.text, extensions=['tables'])
print(update_notes)
+ restart = 'false'
+ if os.environ.get('CONTAINER_NAME'):
+ restart = 'true'
return render(request, 'auto_pt/restart.html',
- context={'update_notes': update_notes}
+ context={
+ 'update_notes': update_notes,
+ 'restart': restart
+ }
)
diff --git a/templates/auto_pt/restart.html b/templates/auto_pt/restart.html
index 5fdcd34..93a2b1b 100644
--- a/templates/auto_pt/restart.html
+++ b/templates/auto_pt/restart.html
@@ -11,7 +11,7 @@
更新日志