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
52ba2adf
Commit
52ba2adf
authored
Aug 07, 2016
by
cervinko
Committed by
GitHub
Aug 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #48 from OzzieIsaacs/patch-1
Fix for #45 DB_ROOT not found
parents
79f373d4
59136a9c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
config.py
cps/config.py
+1
-2
db.py
cps/db.py
+1
-1
helper.py
cps/helper.py
+2
-2
ub.py
cps/ub.py
+1
-1
web.py
cps/web.py
+1
-1
No files found.
cps/config.py
View file @
52ba2adf
...
@@ -5,8 +5,7 @@ import os
...
@@ -5,8 +5,7 @@ import os
import
sys
import
sys
from
configobj
import
ConfigObj
from
configobj
import
ConfigObj
CONFIG_FILE
=
os
.
path
.
join
(
os
.
path
.
normpath
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
+
os
.
sep
+
".."
+
os
.
sep
),
"config.ini"
)
CONFIG_FILE
=
os
.
path
.
join
(
os
.
getcwd
(),
"config.ini"
)
CFG
=
ConfigObj
(
CONFIG_FILE
)
CFG
=
ConfigObj
(
CONFIG_FILE
)
CFG
.
encoding
=
'UTF-8'
CFG
.
encoding
=
'UTF-8'
...
...
cps/db.py
View file @
52ba2adf
...
@@ -5,7 +5,7 @@ from sqlalchemy import *
...
@@ -5,7 +5,7 @@ from sqlalchemy import *
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy.orm
import
*
from
sqlalchemy.orm
import
*
import
os
import
os
from
cps
import
config
import
config
import
re
import
re
import
ast
import
ast
...
...
cps/helper.py
View file @
52ba2adf
#!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
from
cps
import
db
,
ub
import
db
,
ub
from
cps
import
config
import
config
from
flask
import
current_app
as
app
from
flask
import
current_app
as
app
import
smtplib
import
smtplib
...
...
cps/ub.py
View file @
52ba2adf
...
@@ -5,7 +5,7 @@ from sqlalchemy import *
...
@@ -5,7 +5,7 @@ from sqlalchemy import *
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy.orm
import
*
from
sqlalchemy.orm
import
*
import
os
import
os
from
cps
import
config
import
config
from
werkzeug.security
import
generate_password_hash
from
werkzeug.security
import
generate_password_hash
dbpath
=
os
.
path
.
join
(
config
.
APP_DB_ROOT
,
"app.db"
)
dbpath
=
os
.
path
.
join
(
config
.
APP_DB_ROOT
,
"app.db"
)
...
...
cps/web.py
View file @
52ba2adf
...
@@ -8,7 +8,7 @@ import sys
...
@@ -8,7 +8,7 @@ import sys
import
textwrap
import
textwrap
mimetypes
.
add_type
(
'application/xhtml+xml'
,
'.xhtml'
)
mimetypes
.
add_type
(
'application/xhtml+xml'
,
'.xhtml'
)
from
flask
import
Flask
,
render_template
,
session
,
request
,
Response
,
redirect
,
url_for
,
send_from_directory
,
make_response
,
g
,
flash
,
abort
from
flask
import
Flask
,
render_template
,
session
,
request
,
Response
,
redirect
,
url_for
,
send_from_directory
,
make_response
,
g
,
flash
,
abort
from
cps
import
db
,
config
,
ub
,
helper
import
db
,
config
,
ub
,
helper
import
os
import
os
import
errno
import
errno
from
sqlalchemy.sql.expression
import
func
from
sqlalchemy.sql.expression
import
func
...
...
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