Fix token db path
This commit is contained in:
parent
03ceca1620
commit
3e882e862e
@ -3,7 +3,7 @@ services:
|
|||||||
main:
|
main:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
SQLALCHEMY_DATABASE_URI: sqlite:///tokens.db
|
SQLALCHEMY_DATABASE_URI: sqlite:////usr/src/app/tokens.db
|
||||||
volumes:
|
volumes:
|
||||||
- .:/usr/src/app
|
- .:/usr/src/app
|
||||||
ports:
|
ports:
|
||||||
|
@ -10,8 +10,8 @@ import flask
|
|||||||
|
|
||||||
app = flask.Flask(__name__)
|
app = flask.Flask(__name__)
|
||||||
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get(
|
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get(
|
||||||
'DATABASE_URI',
|
'SQLALCHEMY_DATABASE_URI',
|
||||||
'sqlite:///tokens.db'
|
'sqlite:///../tokens.db'
|
||||||
)
|
)
|
||||||
app.config['SQLALCHEMY_ECHO'] = True
|
app.config['SQLALCHEMY_ECHO'] = True
|
||||||
app.config['DEBUG'] = True
|
app.config['DEBUG'] = True
|
||||||
|
@ -8,6 +8,10 @@ set :port, 3000
|
|||||||
def get_tracking_url(tracker)
|
def get_tracking_url(tracker)
|
||||||
tracking_urls = {
|
tracking_urls = {
|
||||||
:ups => 'https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=%s',
|
:ups => 'https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=%s',
|
||||||
|
:dhl => 'http://www.dhl.com/en/express/tracking.html?brand=DHL&AWB=%s',
|
||||||
|
:fedex => 'https://www.fedex.com/apps/fedextrack/?tracknumbers=%s',
|
||||||
|
:ontrac => 'http://www.ontrac.com/trackingres.asp?tracking_number=%s',
|
||||||
|
:usps => 'https://m.usps.com/m/TrackConfirmAction_detail?tLabels=%s',
|
||||||
}
|
}
|
||||||
tracking_url = tracking_urls[tracker.courier_code]
|
tracking_url = tracking_urls[tracker.courier_code]
|
||||||
if tracking_url != nil
|
if tracking_url != nil
|
||||||
|
Loading…
Reference in New Issue
Block a user