diff --git a/shelfzilla/apps/manga/api/serializers.py b/shelfzilla/apps/manga/api/serializers.py index 3fb4838..617195e 100644 --- a/shelfzilla/apps/manga/api/serializers.py +++ b/shelfzilla/apps/manga/api/serializers.py @@ -47,10 +47,10 @@ class VolumeSerializer(serializers.ModelSerializer): def get_cover_thumbnail(self, obj): if obj.cover: - path = get_thumbnailer(obj.cover).get_thumbnail({ + url = get_thumbnailer(obj.cover).get_thumbnail({ 'size': (100, 100), 'crop': 'scale', 'autocrop': True, }).url - return '{}{}'.format(settings.BASE_URL, path) + return url return None class Meta: diff --git a/shelfzilla/settings/base.py b/shelfzilla/settings/base.py index 31e70d3..58cdc5a 100644 --- a/shelfzilla/settings/base.py +++ b/shelfzilla/settings/base.py @@ -325,5 +325,3 @@ DJOSER = { 'LOGIN_AFTER_ACTIVATION': True, 'SEND_ACTIVATION_EMAIL': False, } - -BASE_URL = 'https://shelfzilla.com' diff --git a/shelfzilla/settings/local.py b/shelfzilla/settings/local.py index 61d443f..de881d1 100644 --- a/shelfzilla/settings/local.py +++ b/shelfzilla/settings/local.py @@ -28,12 +28,10 @@ INSTALLED_APPS += ( FILER_DUMP_PAYLOAD = True -MEDIA_URL = '/media/' -STATIC_URL = '/static/' +MEDIA_URL = 'http://localhost:8000/media/' +STATIC_URL = 'http://localhost:8000/static/' EMAIL_BACKEND = 'django_mailgun.MailgunBackend' MAILGUN_ACCESS_KEY = 'key-fdfc57f2bfb35a4ba5f9c1e3c30af373' MAILGUN_SERVER_NAME = 'sandbox2dd21e486d144dc59742738b15e494ee.mailgun.org' FROM_EMAIL = 'info@shelfzilla.com' - -BASE_URL = 'http://localhost:8000'