Przeglądaj źródła

필요한 문서 추가

2DU 8 lat temu
rodzic
commit
9ee2527f4a
2 zmienionych plików z 34 dodań i 3 usunięć
  1. 32 3
      app.py
  2. 2 0
      mark.py

+ 32 - 3
app.py

@@ -1018,8 +1018,8 @@ def xref(name = None, num = 1):
             div += ' (' + data[1] + ')'
         
         div += '</li>'
-    else:        
-        div += '</ul><br><a href="/xref/' + url_pas(name) + '/n/' + str(num - 1) + '">(이전)</a> <a href="/xref/' + url_pas(name) + '/n/' + str(num + 1) + '">(이후)</a>'
+      
+    div += '</ul><br><a href="/xref/' + url_pas(name) + '/n/' + str(num - 1) + '">(이전)</a> <a href="/xref/' + url_pas(name) + '/n/' + str(num + 1) + '">(이후)</a>'
     
     return(
         html_minify(
@@ -1030,6 +1030,34 @@ def xref(name = None, num = 1):
             )
         )
     )
+
+@route('/please')
+@route('/please/<num:int>')
+def please(num = 1):
+    if(num * 50 <= 0):
+        v = 50
+    else:
+        v = num * 50
+        
+    i = v - 50
+    div = '<ul>'
+    
+    curs.execute("select title from back where type = 'no' order by link asc limit ?, ?", [str(i), str(v)])
+    rows = curs.fetchall()
+    for data in rows:
+        div += '<li><a class="not_thing" href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'        
+        
+    div += '</ul><br><a href="/please/' + str(num - 1) + '">(이전)</a> <a href="/please/' + str(num + 1) + '">(이후)</a>'
+    
+    return(
+        html_minify(
+            template('index', 
+                imp = ['필요한 문서', wiki_set(1), custom(), other2([0, 0])],
+                data = div,
+                menu = [['other', '기타']]
+            )
+        )
+    )
         
 @route('/recent_discuss')
 @route('/recent_discuss/<tools:path>')
@@ -1865,7 +1893,8 @@ def other():
                                     ' * [[wiki:title_index|모든 문서]]\r\n' + \
                                     ' * [[wiki:acl_list|ACL 문서]]\r\n' + \
                                     ' * [[wiki:admin_list|관리자 목록]]\r\n' + \
-                                    ' * [[wiki:give_log|권한 목록]]\r\n' + \
+                                    ' * [[wiki:give_log|권한 목록]]\r\n' + 
+                                    ' * [[wiki:please|필요한 문서]]\r\n' + \
                                     ' * [[wiki:upload|파일 올리기]]\r\n' + \
                                     '== 관리자 ==\r\n' + \
                                     ' * [[wiki:manager/1|관리자 메뉴]]\r\n' + \

+ 2 - 0
mark.py

@@ -699,6 +699,8 @@ def namumark(title, data, num, in_c, toc_y):
                     curs.execute("select title from data where title = ?", [href.replace('\\', '')])
                     if(not curs.fetchall()):
                         no = 'class="not_thing"'
+
+                        backlink_plus(title, href.replace('\\', ''), 'no', num)
                     else:
                         no = ''