This file contains hidden or 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
" memo: howto install everything | |
" 1. you have python3, vim and brew already installed | |
" 2. install Vundle: https://github.com/VundleVim/Vundle.vim | |
" 3. install flake8 with: pip3 install flake8 | |
" 4. install your favourite plugins with https://vimawesome.com and use this ~/.vimrc config file | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize |
This file contains hidden or 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
class BaseImage(models.Model): | |
original_image = ProcessedImageField(null = True, blank = True, upload_to='static/original',) | |
admin_thumbnail = ImageSpec([Adjust(contrast=1.2, sharpness=1.1), | |
resize.Crop(50, 50)], image_field='original_image', options={'quality': 90}) | |
def __unicode__(self): | |
return u"%s" % (self.original_image) | |
class Meta: | |
abstract = True | |
class FirstTest(BaseImage): |