Commit b5127f27 authored by litaolemo's avatar litaolemo

update

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