Skip to content

Instantly share code, notes, and snippets.

@gabbork
gabbork / .vimrc
Last active November 10, 2017 18:21
My vim configuration on macOS Sierra, mainly used for python3
" 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
@gabbork
gabbork / imagekit-inheritance-attribute-error.py
Created February 15, 2012 15:47
AttributeError using inheritance with 2 ImageSpec
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):