diff options
Diffstat (limited to 'app/utils')
-rw-r--r-- | app/utils/util.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/utils/util.py b/app/utils/util.py index 1779baa..b765e78 100644 --- a/app/utils/util.py +++ b/app/utils/util.py @@ -35,7 +35,7 @@ def convertll(lat, lon): def get_latlon(): - loc = apps.get_model('locations', 'CheckIn').objects.latest() + loc = apps.get_model('locations', 'LuxCheckIn').objects.latest() lat_converted, lon_converted = convertll(loc.lat, loc.lon) return lat_converted, lon_converted @@ -55,8 +55,11 @@ def parse_image(s): for img in soup.find_all('img'): try: cl = img['class'] - if cl[0] == 'postpic' or cl[0] == 'postpicright': + #if cl[0] == 'postpic' or cl[0] == 'postpicright': + replacer = "[[base_url]]" + if replacer in str(img): s = str(img).replace('[[base_url]]', settings.IMAGES_URL) + print(s) return s else: try: |