This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# regist by chenchiyuan, chenchiyuan03@gmail.com, Upyun python sdk, storage for django. | |
# UpYun storage for django, written by Tyr Chen @ tukeq.com | |
# to run this gist you need to get upyun python sdk first. | |
# Waring: need to force name str, so in UpYunStorage _save, name = to_str(name). | |
# Implement django file storage. | |
class Photo(models.Model): | |
name = models.CharField(_('图片名'), max_length=64, help_text=_(''), unique=True) | |
filename = UpYunFileField(verbose_name = _('文件名'), help_text=_('')) |