我得到:
ImportError: cannot import name Image (from image_blob.py)
请帮助我,谢谢:s
我的代码:
图像.py:
from google.appengine.ext import db
from app.models.item import Item
class Image(Item):
# imports
from app.models.image_blob import ImageBlob
#from app.models.user import User
#from list_user import ListUser # is needed in order to have the references
# references
#uploaded_by_user = db.ReferenceProperty(User, required = True)
large_image = db.ReferenceProperty(ImageBlob, required = True)
small_image = db.ReferenceProperty(ImageBlob, required = True)
# image info
title = db.StringProperty(required = True)
description = db.StringProperty(required = False)
# metadata
# relations
图像块:
from google.appengine.ext import db
class ImageBlob(db.Model):
from app.models.image import Image
data = db.BlobProperty(required = True)
image = db.ReferenceProperty(Image, required = True)