I have the following model:
class Image(db.Model):
auction = db.ReferenceProperty(Auction)
image = db.BlobProperty()
thumb = db.BlobProperty()
caption = db.StringProperty()
item_to_tag = db.StringProperty()
And the following form:
class ImageForm(djangoforms.ModelForm):
class Meta:
model = Image
When I call ImageForm(), only the non-Blob fields are created, like this:
<tr><th><label for="id_auction">Auction:</label></th><td><select name="auction" id="id_auction">
<option value="" selected="selected">---------</option>
<option value="ahRoYXJ0bWFuYXVjdGlvbmVlcmluZ3INCxIHQXVjdGlvbhgKDA">2010-06-19 11:00:00</option>
</select></td></tr>
<tr><th><label for="id_caption">Caption:</label></th><td><input type="text" name="caption" id="id_caption" /></td></tr>
<tr><th><label for="id_item_to_tag">Item to tag:</label></th><td><input type="text" name="item_to_tag" id="id_item_to_tag" /></td></tr>
I expect the Blob fields to be included in the form as well (as file inputs). What am I doing wrong?