From dd09ca3810ea0798899870930c3efb388b776a7c Mon Sep 17 00:00:00 2001 From: lxf Date: Sat, 25 May 2019 15:10:38 +0000 Subject: made some changes to use new checkin model --- app/utils/util.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/utils') 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: -- cgit v1.2.3-70-g09d2