2DU 9 ani în urmă
părinte
comite
7b50c4167a
2 a modificat fișierele cu 9 adăugiri și 4 ștergeri
  1. 1 2
      app.py
  2. 8 2
      templates/index.html

+ 1 - 2
app.py

@@ -38,7 +38,6 @@ def history(number, title, data, date, ip, send, leng):
 def redirect():
 def redirect():
     return '<meta http-equiv="refresh" content="0;url=/w/' + parse.quote(data['frontpage']) + '" />'
     return '<meta http-equiv="refresh" content="0;url=/w/' + parse.quote(data['frontpage']) + '" />'
 
 
-@app.route('/RecentChanges')
 @app.route('/recentchanges')
 @app.route('/recentchanges')
 def recentchanges():
 def recentchanges():
     i = 0
     i = 0
@@ -103,7 +102,7 @@ def setup():
     curs.execute("create table if not exists user(id text not null, pw text not null, acl text not null)")
     curs.execute("create table if not exists user(id text not null, pw text not null, acl text not null)")
     curs.execute("create table if not exists ban(block text not null, end text not null, why text not null, band text not null)")
     curs.execute("create table if not exists ban(block text not null, end text not null, why text not null, band text not null)")
     curs.execute("create table if not exists topic(id text not null, title text not null, sub text not null, data longtext not null, date text not null, ip text not null, block text not null)")
     curs.execute("create table if not exists topic(id text not null, title text not null, sub text not null, data longtext not null, date text not null, ip text not null, block text not null)")
-    return '문제 없음'
+    return render_template('index.html', title = '설치 완료', logo = data['name'], data = '문제 없음')
 
 
 if __name__ == '__main__':
 if __name__ == '__main__':
     app.run(host = '0.0.0.0', port = 3000)
     app.run(host = '0.0.0.0', port = 3000)

+ 8 - 2
templates/index.html

@@ -15,8 +15,8 @@
 			<div id="top">
 			<div id="top">
 				<a href="/" id="logo">{{logo}}</a>
 				<a href="/" id="logo">{{logo}}</a>
 				<div>
 				<div>
-					<a href="/RecentChanges" id="RecentChanges"><i class="fa fa-refresh" aria-hidden="true"></i><span id="is_mobile">최근 변경</span></a>
-					<a href="/RecentChanges" id="RecentChanges"><i class="fa fa-comment" aria-hidden="true"></i><span id="is_mobile">최근 토론</span></a>
+					<a href="/recentchanges" id="RecentChanges"><i class="fa fa-refresh" aria-hidden="true"></i><span id="is_mobile">최근 변경</span></a>
+					<a href="/recentdiscuss" id="RecentChanges"><i class="fa fa-comment" aria-hidden="true"></i><span id="is_mobile">최근 토론</span></a>
 					<a href="/random" id="log"><i class="fa fa-random" aria-hidden="true"></i></a>
 					<a href="/random" id="log"><i class="fa fa-random" aria-hidden="true"></i></a>
 					<a href="/user" id="log"><i class="fa fa-user" aria-hidden="true"></i></a>
 					<a href="/user" id="log"><i class="fa fa-user" aria-hidden="true"></i></a>
 					<a href="/other" id="log"><i class="fa fa-cogs" aria-hidden="true"></i></a>
 					<a href="/other" id="log"><i class="fa fa-cogs" aria-hidden="true"></i></a>
@@ -108,6 +108,12 @@
 				</tbody>
 				</tbody>
 			</table>
 			</table>
 			{% endfor %}
 			{% endfor %}
+			{% else %}
+			<h1 class="title">{{title}}</h1>
+			<h2 class="title"><span style="margin-left:5px"></span></h2>
+			<div>
+				{{data}}
+			</div>
 			{% endif %}
 			{% endif %}
 			<hr id="last">
 			<hr id="last">
 			<p>{{license}}</p>
 			<p>{{license}}</p>