Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHARISM
Shelter Database
Commits
b6b3759e
Commit
b6b3759e
authored
Sep 06, 2016
by
Aron Gergely
Browse files
API '/shelters' resource now looks for pictures path in conf.py
parent
56b170c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/web/views/shelterapiv02.py
View file @
b6b3759e
...
...
@@ -14,13 +14,13 @@ __revision__ = ""
__copyright__
=
""
__license__
=
""
#from bootstrap import db
from
bootstrap
import
db
,
app
from
sqlalchemy.sql
import
func
,
select
from
flask
import
Blueprint
,
jsonify
,
request
,
json
,
Response
from
collections
import
defaultdict
from
web.models
import
Shelter
,
Attribute
,
Property
,
Value
,
Association
,
ShelterPicture
,
Category
,
Tsvector
,
Translation
import
conf
,
os
.
path
apiv02_bp
=
Blueprint
(
'development api v0.2'
,
__name__
,
url_prefix
=
'/api/v0.2'
)
...
...
@@ -148,7 +148,9 @@ def allshelters(shelter_id=None):
result
=
tree
()
#shelter pictures folder path
picpath
=
'/public/pictures/shelters'
picpath
=
os
.
path
.
relpath
(
conf
.
SHELTERS_PICTURES_PATH
)
Supercategory
=
db
.
aliased
(
Category
)
...
...
Write
Preview
Supports
Markdown
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