Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
27d5a79e
Commit
27d5a79e
authored
Apr 20, 2016
by
Cervinko Cera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some commented code and debug prints
parent
6a3115eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
13 deletions
+0
-13
helper.py
cps/helper.py
+0
-5
web.py
cps/web.py
+0
-8
No files found.
cps/helper.py
View file @
27d5a79e
...
@@ -200,8 +200,3 @@ def update_dir_stucture(book_id):
...
@@ -200,8 +200,3 @@ def update_dir_stucture(book_id):
book
.
path
=
new_authordir
+
"/"
+
book
.
path
.
split
(
"/"
)[
1
]
book
.
path
=
new_authordir
+
"/"
+
book
.
path
.
split
(
"/"
)[
1
]
db
.
session
.
commit
()
db
.
session
.
commit
()
#def get_custom_columns(id):
# cc = db.session.query(db.Custom_Columns).all()
# for c in cc:
# print c.name
cps/web.py
View file @
27d5a79e
...
@@ -317,10 +317,6 @@ def discover(page):
...
@@ -317,10 +317,6 @@ def discover(page):
def
show_book
(
id
):
def
show_book
(
id
):
entries
=
db
.
session
.
query
(
db
.
Books
)
.
filter
(
db
.
Books
.
id
==
id
)
.
first
()
entries
=
db
.
session
.
query
(
db
.
Books
)
.
filter
(
db
.
Books
.
id
==
id
)
.
first
()
cc
=
db
.
session
.
query
(
db
.
Custom_Columns
)
.
filter
(
db
.
Custom_Columns
.
datatype
.
notin_
(
db
.
cc_exceptions
))
.
all
()
cc
=
db
.
session
.
query
(
db
.
Custom_Columns
)
.
filter
(
db
.
Custom_Columns
.
datatype
.
notin_
(
db
.
cc_exceptions
))
.
all
()
for
c
in
cc
:
print
c
.
name
#print entries.custom_column_1
#helper.get_custom_columns(entries.id)
book_in_shelfs
=
[]
book_in_shelfs
=
[]
shelfs
=
ub
.
session
.
query
(
ub
.
BookShelf
)
.
filter
(
ub
.
BookShelf
.
book_id
==
id
)
.
all
()
shelfs
=
ub
.
session
.
query
(
ub
.
BookShelf
)
.
filter
(
ub
.
BookShelf
.
book_id
==
id
)
.
all
()
for
entry
in
shelfs
:
for
entry
in
shelfs
:
...
@@ -700,8 +696,6 @@ def edit_book(book_id):
...
@@ -700,8 +696,6 @@ def edit_book(book_id):
## create the function for sorting...
## create the function for sorting...
db
.
session
.
connection
()
.
connection
.
connection
.
create_function
(
"title_sort"
,
1
,
db
.
title_sort
)
db
.
session
.
connection
()
.
connection
.
connection
.
create_function
(
"title_sort"
,
1
,
db
.
title_sort
)
cc
=
db
.
session
.
query
(
db
.
Custom_Columns
)
.
filter
(
db
.
Custom_Columns
.
datatype
.
notin_
(
db
.
cc_exceptions
))
.
all
()
cc
=
db
.
session
.
query
(
db
.
Custom_Columns
)
.
filter
(
db
.
Custom_Columns
.
datatype
.
notin_
(
db
.
cc_exceptions
))
.
all
()
for
c
in
cc
:
print
c
.
name
book
=
db
.
session
.
query
(
db
.
Books
)
.
filter
(
db
.
Books
.
id
==
book_id
)
.
first
()
book
=
db
.
session
.
query
(
db
.
Books
)
.
filter
(
db
.
Books
.
id
==
book_id
)
.
first
()
author_names
=
[]
author_names
=
[]
for
author
in
book
.
authors
:
for
author
in
book
.
authors
:
...
@@ -923,9 +917,7 @@ def upload():
...
@@ -923,9 +917,7 @@ def upload():
img
.
save
(
filename
=
os
.
path
.
join
(
filepath
,
"cover.jpg"
))
img
.
save
(
filename
=
os
.
path
.
join
(
filepath
,
"cover.jpg"
))
has_cover
=
1
has_cover
=
1
is_author
=
db
.
session
.
query
(
db
.
Authors
)
.
filter
(
db
.
Authors
.
name
==
author
)
.
first
()
is_author
=
db
.
session
.
query
(
db
.
Authors
)
.
filter
(
db
.
Authors
.
name
==
author
)
.
first
()
print
is_author
if
is_author
:
if
is_author
:
print
'Unknown is known Author'
db_author
=
is_author
db_author
=
is_author
else
:
else
:
db_author
=
db
.
Authors
(
author
,
""
,
""
)
db_author
=
db
.
Authors
(
author
,
""
,
""
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment