Did I find the right examples for you? yes no

All Samples(5)  |  Call(2)  |  Derive(0)  |  Import(3)

src/c/o/CollectorCity-Market-Place-HEAD/stores/apps/for_sale/views.py   CollectorCity-Market-Place(Download)
from datetime import timedelta
 
from models import Item, ImageItem
from forms import ItemForm, ImageItemForm
 
            Item.update_latest_item(shop)
            for img in request.FILES.getlist('file'):
                image = ImageItem()
                image.item = item
                image.image.save(img.name,img)
            f = request.FILES.get('files')
            if f and not (total >= limit):
                image = ImageItem(item=item)
                image.image.save(f.name, f)
                item.save()

src/c/o/CollectorCity-Market-Place-HEAD/stores/apps/for_sale/forms.py   CollectorCity-Market-Place(Download)
from django.forms import ModelForm, ModelChoiceField
 
from models import Item, ImageItem
from market.models import MarketCategory
 

src/c/o/CollectorCity-Market-Place-HEAD/stores/apps/for_sale/models.py   CollectorCity-Market-Place(Download)
    def image(self):
        from models import ImageItem
        try:
            return ImageItem.objects.filter(item=self).filter(primary_picture=True).get()
        except ImageItem.DoesNotExist: