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/lots/views.py   CollectorCity-Market-Place(Download)
from lots.forms import LotForm, ImageLotForm 
from market.forms import MarketCategoryForm, MarketSubCategoryForm
from models import ImageLot, Lot
 
PAGE_LOTS = 10
            lot.save()
            for img in request.FILES.getlist('file'):
                image = ImageLot(image = img, lot=lot)
                image.save()
#                image.lot = lot
            f = request.FILES.get('files')
            if f and not (total >= limit):
                image = ImageLot(lot=lot)
                image.image.save(f.name, f)
                lot.save()

src/c/o/CollectorCity-Market-Place-HEAD/stores/apps/lots/forms.py   CollectorCity-Market-Place(Download)
from django.forms import ModelForm, ModelChoiceField
 
from auctions.models import AuctionSession
from models import Lot, ImageLot
from market.models import MarketCategory, MarketSubCategory

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