Commit b5127f27 authored by litaolemo's avatar litaolemo

update

parent 602fada3
from .upload import * from .upload import *
from crawler.gm_upload.gm_upload.utils.basefield import ImgUrlField # from crawler.gm_upload.gm_upload.utils.basefield import ImgUrlField
from crawler.gm_upload.gm_upload.consts import IMG_TYPE from crawler.gm_upload.gm_upload.consts import IMG_TYPE
__version__ = '0.0.89' __version__ = '0.0.89'
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django.db.models.fields import CharField # from django.db.models.fields import CharField
from django.db import models # from django.db import models
from .image_utils import get_full_path, get_short_path from .image_utils import get_full_path, get_short_path
from crawler.gm_upload.gm_upload.consts import GmImageManager, IMG_TYPE from crawler.gm_upload.gm_upload.consts import GmImageManager, IMG_TYPE
...@@ -41,8 +41,8 @@ class ImgUrlField(CharField): ...@@ -41,8 +41,8 @@ class ImgUrlField(CharField):
return get_short_path(value, self.domain) return get_short_path(value, self.domain)
except Exception: except Exception:
return value return value
#
def deconstruct(self): # def deconstruct(self):
name, path, args, kwargs = super(ImgUrlField, self).deconstruct() # name, path, args, kwargs = super(ImgUrlField, self).deconstruct()
kwargs['img_type'] = self._img_type # kwargs['img_type'] = self._img_type
return name, path, args, kwargs # return name, path, args, kwargs
Markdown is supported
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