2DU před 8 roky
rodič
revize
0bc352199a
6 změnil soubory, kde provedl 16 přidání a 45 odebrání
  1. 6 5
      app.py
  2. 4 17
      readme.md
  3. 1 1
      update_mysql.py
  4. 1 1
      version.md
  5. 3 20
      views/css/style.css
  6. 1 1
      views/topic.tpl

+ 6 - 5
app.py

@@ -62,7 +62,7 @@ def redirect(data):
     
     
 from func import *
 from func import *
 
 
-r_ver = '2.2.0'
+r_ver = '2.2.1'
 
 
 try:
 try:
     curs.execute('select data from other where name = "version"')
     curs.execute('select data from other where name = "version"')
@@ -662,7 +662,7 @@ def history_view(name = None, num = 1):
                             <td style="width: 33.3%;">시간</td> \
                             <td style="width: 33.3%;">시간</td> \
                         </tr>'
                         </tr>'
         
         
-        curs.execute("select send, leng, ip, date, title, id from history where title = ? order by id + 0 desc limit ?, ?", [name, str(i), str(v)])
+        curs.execute("select send, leng, ip, date, title, id from history where title = ? order by id + 0 desc limit ?, ?", [name, str(j), str(i)])
         all_data = curs.fetchall()
         all_data = curs.fetchall()
         for data in all_data:
         for data in all_data:
             select += '<option value="' + data[5] + '">' + data[5] + '</option>'
             select += '<option value="' + data[5] + '">' + data[5] + '</option>'
@@ -1848,11 +1848,12 @@ def topic(name = None, sub = None):
             )
             )
         )
         )
         
         
-@route('/topic/<name:path>/<tool:path>')
 @route('/topic/<name:path>', method=['POST', 'GET'])
 @route('/topic/<name:path>', method=['POST', 'GET'])
+@route('/topic/<name:path>/<tool:path>', method=['GET'])
 def close_topic_list(name = None, tool = None):
 def close_topic_list(name = None, tool = None):
     div = ''
     div = ''
     i = 0
     i = 0
+    list_d = 0
 
 
     if(request.method == 'POST'):
     if(request.method == 'POST'):
         t_num = ''
         t_num = ''
@@ -1877,7 +1878,7 @@ def close_topic_list(name = None, tool = None):
             sub = '합의'
             sub = '합의'
         else:
         else:
             list_d = 1
             list_d = 1
-            curs.execute("select sub from rd where title = ? order by date desc")
+            curs.execute("select sub from rd where title = ? order by date desc", [name])
             sub = '토론 목록'
             sub = '토론 목록'
 
 
         rows = curs.fetchall()
         rows = curs.fetchall()
@@ -2428,7 +2429,7 @@ def read_view(name = None, num = None, redirect = None):
     curs.execute("select sub from rd where title = ? order by date desc", [name])
     curs.execute("select sub from rd where title = ? order by date desc", [name])
     rows = curs.fetchall()
     rows = curs.fetchall()
     for data in rows:
     for data in rows:
-        curs.execute("select title from stop where title = ? and sub = ? and close = 'O'", [name, data['sub']])
+        curs.execute("select title from stop where title = ? and sub = ? and close = 'O'", [name, data[0]])
         row = curs.fetchall()
         row = curs.fetchall()
         if(not row):
         if(not row):
             topic = "open"
             topic = "open"

+ 4 - 17
readme.md

@@ -2,35 +2,29 @@
 오픈나무 정식 버전 입니다. 파이썬 Bottle 기반으로 돌아 갑니다.
 오픈나무 정식 버전 입니다. 파이썬 Bottle 기반으로 돌아 갑니다.
 
 
 ## 설치법
 ## 설치법
-set 폴더에 있는 set.json을 폴더 밖으로 꺼내고 json 내용을 수정하고 app.py를 파이썬 3.x 버전으로 실행하고 ../setup 에 들어가면 됩니다. (파이썬 3.6을 권장 합니다.)
+app.py를 파이썬 3.x 버전으로 실행하고 완료되면 ../setup 에 들어가면 됩니다. (파이썬 3.6을 권장 합니다.)
 
 
-등등등등
+첫 번째 가입자에게 소유자 권한이 부여됩니다.
 
 
 ## 기타
 ## 기타
  * [테스트 서버](http://namu.ml/)
  * [테스트 서버](http://namu.ml/)
  
  
 ## 의존성
 ## 의존성
-### 기본
- * [MariaDB](https://mariadb.org/)나 [MySQL](https://www.mysql.com/)
 ### 윈도우
 ### 윈도우
  * pip install [bottle](https://pypi.python.org/pypi/bottle)
  * pip install [bottle](https://pypi.python.org/pypi/bottle)
  * pip install [bottle-beaker](https://pypi.python.org/pypi/bottle-beaker)
  * pip install [bottle-beaker](https://pypi.python.org/pypi/bottle-beaker)
  * pip install [tornado](https://pypi.python.org/pypi/tornado)
  * pip install [tornado](https://pypi.python.org/pypi/tornado)
  * pip install [bcrypt](https://pypi.python.org/pypi/bcrypt)
  * pip install [bcrypt](https://pypi.python.org/pypi/bcrypt)
- * pip install [pymysql](https://pypi.python.org/pypi/PyMySQL)
 ### 우분투
 ### 우분투
  * pip3 install [bottle](https://pypi.python.org/pypi/bottle)
  * pip3 install [bottle](https://pypi.python.org/pypi/bottle)
  * pip3 install [bottle-beaker](https://pypi.python.org/pypi/bottle-beaker)
  * pip3 install [bottle-beaker](https://pypi.python.org/pypi/bottle-beaker)
  * pip3 install [tornado](https://pypi.python.org/pypi/tornado)
  * pip3 install [tornado](https://pypi.python.org/pypi/tornado)
  * pip3 install [bcrypt](https://pypi.python.org/pypi/bcrypt)
  * pip3 install [bcrypt](https://pypi.python.org/pypi/bcrypt)
- * pip3 install [pymysql](https://pypi.python.org/pypi/PyMySQL)
 ### 자세한 설명
 ### 자세한 설명
  * [참조](http://namu.ml/w/오픈나무%2F설치법)
  * [참조](http://namu.ml/w/오픈나무%2F설치법)
  
  
 ## set.json 설명
 ## set.json 설명
  * db = 데이터베이스 이름
  * db = 데이터베이스 이름
- * user = 데이터베이스 사용자명 (기본 : root)
- * pw = 그 사용자의 비밀번호
  * name = 위키 이름
  * name = 위키 이름
  * frontpage = 위키 대문
  * frontpage = 위키 대문
  * license = 하단에 표기 될 라이선스
  * license = 하단에 표기 될 라이선스
@@ -38,12 +32,5 @@ set 폴더에 있는 set.json을 폴더 밖으로 꺼내고 json 내용을 수
  * upload = 업로드 제한 (메가 바이트 단위)
  * upload = 업로드 제한 (메가 바이트 단위)
  * port = 위키 열 포트 (기본 : 3000)
  * port = 위키 열 포트 (기본 : 3000)
 
 
-## 업데이트
-오픈나무를 받고 덮어 쓰기를 한 다음 update.py를 실행하고 오픈나무를 키면 됩니다.
- 
-## 설치 설명
-의존성 유틸들을 설치 합니다.
-
-그 다음 오픈나무 set.json을 폴더 밖에 꺼낸 후 설명에 따라 커스텀 합니다.
-
-오픈나무를 키고 ../setup 에 들어가서 설치를 하고 회원 가입으로 가입 합니다.
+## MySQL 버전에서 업데이트
+오픈나무를 받고 덮어 쓰기를 한 다음 update-mysql.py를 실행하고 완료하면 app.py를 키면 됩니다.

+ 1 - 1
update_mysql.py

@@ -17,7 +17,7 @@ conn = pymysql.connect(
 )
 )
 curs = conn.cursor(pymysql.cursors.DictCursor)   
 curs = conn.cursor(pymysql.cursors.DictCursor)   
 
 
-r_ver = '2.2.0'
+r_ver = '2.2.1'
 
 
 curs2.execute("create table data(title text, data text, acl text)")
 curs2.execute("create table data(title text, data text, acl text)")
 curs2.execute("create table history(id text, title text, data text, date text, ip text, send text, leng text)")
 curs2.execute("create table history(id text, title text, data text, date text, ip text, send text, leng text)")

+ 1 - 1
version.md

@@ -121,7 +121,7 @@
 
 
 ----
 ----
 ## 기타
 ## 기타
- * 최신 버전 - v2.2.0
+ * 최신 버전 - v2.2.1
 
 
 ----
 ----
 ## 개발 이념
 ## 개발 이념

+ 3 - 20
views/css/style.css

@@ -352,23 +352,6 @@ body {
     background: #EFEFEF;
     background: #EFEFEF;
 }
 }
 
 
-#left_bar {
-    height: 100%;
-    width: 15%;
-    position: fixed;
-    overflow-y: scroll;
-    left: 0;
-    top: 0;
-    background: white;
-    padding: 20px;
-}
-
-@media (min-width: 1920px) {
-    #left_bar {
-        width: 12%;
-    }
-}
-
 #yosolo {
 #yosolo {
     width: 33.33%;
     width: 33.33%;
     text-align: center;
     text-align: center;
@@ -431,8 +414,8 @@ body {
         width: 100%;
         width: 100%;
     }
     }
 
 
-    #left_bar {
-        display: none;
+    table {
+        min-width: 100%;
     }
     }
 }
 }
 
 
@@ -522,4 +505,4 @@ pre span {
     z-index: 10000;
     z-index: 10000;
     max-height: 30%;
     max-height: 30%;
     overflow-y: scroll;
     overflow-y: scroll;
-}
+}

+ 1 - 1
views/topic.tpl

@@ -5,7 +5,7 @@
         <a class="menu-item selected" href="#" onclick="return false">
         <a class="menu-item selected" href="#" onclick="return false">
             {{sub}}
             {{sub}}
         </a>
         </a>
-        % if(defined('list')):
+        % if(list == 1):
             <a class="menu-item" href="/w/{{get('page', '')}}">문서</a>
             <a class="menu-item" href="/w/{{get('page', '')}}">문서</a>
         % else:
         % else:
             <a class="menu-item" href="/topic/{{page}}">토론 목록</a>
             <a class="menu-item" href="/topic/{{page}}">토론 목록</a>