Skip to content

Commit

Permalink
removed old thumbnailing system, do that in your own project
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Cabrera committed Jan 12, 2011
1 parent 22a4bef commit e5a1e10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 190 deletions.
11 changes: 3 additions & 8 deletions stockroom/models.py
Expand Up @@ -4,14 +4,9 @@
from django.utils.translation import ugettext as _
from datetime import datetime
from managers import CategoryChildrenManager, ActiveInventoryManager
from thumbs import ImageWithThumbsField
from units import STOCKROOM_UNITS

# Set default values

IMAGE_GALLERY_LIMIT = getattr(settings, 'STOCKROOM_IMAGE_GALLERY_LIMIT', 8)
STOCKROOM_CATEGORY_SEPARATOR = getattr(settings, 'STOCKROOM_CATEGORY_SEPARATOR', ' :: ')
PRODUCT_THUMBNAILS = getattr(settings, 'STOCKROOM_PRODUCT_THUMBNAIL_SIZES', None)
ATTRIBUTE_VALUE_UNITS = getattr(settings, 'STOCKROOM_UNITS', STOCKROOM_UNITS)

class Manufacturer(models.Model):
Expand All @@ -25,7 +20,7 @@ class Brand(models.Model):
name = models.CharField(max_length=120)
description = models.TextField(null=True, blank=True)
manufacturer = models.ForeignKey('Manufacturer')
logo = ImageWithThumbsField(upload_to='stockroom/brand_logos', null=True, blank=True)
logo = models.ImageField(upload_to='stockroom/brand_logos', null=True, blank=True)

def __unicode__(self):
return _(self.name)
Expand Down Expand Up @@ -75,7 +70,7 @@ def _recurse_for_parents(self, category_object):
return parent_list

def get_separator(self):
return STOCKROOM_CATEGORY_SEPARATOR
return ':'

def _parents_repr(self):
parent_list = self._recurse_for_parents(self)
Expand Down Expand Up @@ -108,7 +103,7 @@ def __unicode__(self):

class StockItemImage(models.Model):
stock_item = models.ForeignKey('StockItem', related_name='images')
image = ImageWithThumbsField(upload_to='stockroom/stock_item_images/%Y/%m/%d', sizes=PRODUCT_THUMBNAILS)
image = models.ImageField(upload_to='stockroom/stock_items/%Y/%m/%d')
caption = models.TextField(null=True, blank=True)

class Meta:
Expand Down
182 changes: 0 additions & 182 deletions stockroom/thumbs.py

This file was deleted.

0 comments on commit e5a1e10

Please sign in to comment.