2DU 9 лет назад
Родитель
Сommit
e43817a311
3 измененных файлов с 12 добавлено и 8 удалено
  1. 4 2
      app.py
  2. 2 0
      mark.py
  3. 6 6
      static/style.css

+ 4 - 2
app.py

@@ -1,4 +1,4 @@
-from bottle import route, run, template, error, request, static_file, app
+from bottle import route, run, template, error, request, static_file, app, BaseRequest
 from bottle.ext import beaker
 import bcrypt
 import os
@@ -17,6 +17,8 @@ session_opts = {
 }
 
 app = beaker.middleware.SessionMiddleware(app(), session_opts)
+
+BaseRequest.MEMFILE_MAX = 1024 * 1024
     
 def start():
     try:
@@ -2706,4 +2708,4 @@ def error_test(num = None):
 def error_404(error):
     return redirect('/w/' + url_pas(set_data['frontpage']))
     
-run(app = app, server='tornado', host = '0.0.0.0', port = int(set_data['port']), debug = True)
+run(app = app, server='tornado', host = '0.0.0.0', port = int(set_data['port']))

+ 2 - 0
mark.py

@@ -76,6 +76,8 @@ def html_pas(data, how):
     data = re.sub('"', '"', data)
     
     data = re.sub("\[(?P<in>(?:\/)?(?:a|div|span|embed|iframe)(?:[^\]]*))\]", "<\g<in>>", data)
+    data = re.sub("\[<", "[[", data)
+    data = re.sub(">\]", "]]", data)
     data = re.sub('#.#', '"', data)
     
     return data

+ 6 - 6
static/style.css

@@ -1,5 +1,5 @@
 #logo:hover, #logo:focus {
-    color: #e5dafb;
+    color: #B2DFEA;
 }
 
 #in {
@@ -23,7 +23,7 @@
 }
 
 #log:hover, #log:focus {
-    color: #e5dafb;
+    color: #B2DFEA;
 }
 
 button#goto {
@@ -132,7 +132,7 @@ blockquote {
     background:#eeeeee;
     display:table;
     border:2px dashed #ccc;
-    border-left:5px solid #8D7DAD;
+    border-left:5px solid #52A9BD;
     background-image: url('../static/images/quote.png');
     background-position:calc(100% - 10px) 10px;
     background-repeat:no-repeat;
@@ -229,7 +229,7 @@ s:hover, strike:hover, del:hover {
 .one-fifth.column {
     margin-bottom: 20px;
     margin-top: -18px;
-    background: #8D7DAD;
+    background: #52A9BD;
     z-index: 2;
     position: relative;
 }
@@ -451,7 +451,7 @@ a.not_thing {
 }
 
 #open {
-    background: #E5DAFB;
+    background: #B2DFEA;
     text-shadow: none;
 }
 
@@ -473,7 +473,7 @@ pre span {
 
 #RecentChanges:hover, #RecentChanges:focus {        
     text-decoration: none;        
-    color: #e5dafb;        
+    color: #B2DFEA;        
 }
 
 #RecentChanges {