No Description

url_utils.py 366B

12345678910111213141516
  1. # -*- coding: utf-8 -*-
  2. from django.conf import settings
  3. def img_url(img_path):
  4. return '{}/{}'.format(settings.IMG_DOMAIN, img_path) if img_path else ''
  5. def share_url(photo_id):
  6. return '{}/gp/{}'.format(settings.DOMAIN, photo_id) if photo_id else ''
  7. def upload_file_url(file_path):
  8. return file_path and ('{}{}'.format(settings.DOMAIN, file_path))