Commit b6b3759e authored by Aron Gergely's avatar Aron Gergely
Browse files

API '/shelters' resource now looks for pictures path in conf.py

parent 56b170c6
...@@ -14,13 +14,13 @@ __revision__ = "" ...@@ -14,13 +14,13 @@ __revision__ = ""
__copyright__ = "" __copyright__ = ""
__license__ = "" __license__ = ""
#from bootstrap import db
from bootstrap import db, app from bootstrap import db, app
from sqlalchemy.sql import func, select from sqlalchemy.sql import func, select
from flask import Blueprint, jsonify, request, json, Response from flask import Blueprint, jsonify, request, json, Response
from collections import defaultdict from collections import defaultdict
from web.models import Shelter, Attribute, Property, Value, Association, ShelterPicture, Category, Tsvector, Translation 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') apiv02_bp = Blueprint('development api v0.2', __name__, url_prefix='/api/v0.2')
...@@ -148,7 +148,9 @@ def allshelters(shelter_id=None): ...@@ -148,7 +148,9 @@ def allshelters(shelter_id=None):
result = tree() result = tree()
#shelter pictures folder path #shelter pictures folder path
picpath = '/public/pictures/shelters'
picpath = os.path.relpath(conf.SHELTERS_PICTURES_PATH)
Supercategory = db.aliased(Category) Supercategory = db.aliased(Category)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment