littleq0903 / appengine-admin

Automatically exported from code.google.com/p/appengine-admin
0 stars 0 forks source link

New item creation with blobproperty fails #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a simple model with a blob property
class PhotosOfCats(db.Model):
    name = db.StringProperty()                                                       
    image = db.BlobProperty()

2. Create and register corresponding appengine_admin.ModelAdmin
3. Attempt to create a new object via admin interface

What is the expected output? What do you see instead?
Instead of working, an error is thrown:
TypeError: value_from_datadict() takes exactly 3 arguments (4 given)

What version of the product are you using? On what operating system?
Trunk version, lastest GAE (python 2.5)

Please provide any additional information below.
value_from_datadict is being called with 4 arguments because the form includes 
FILES in addition to DATA. To fix, simply accept a fourth parameter for FILES
I've attached a diff of admin_widgets.py that resolves this issue

Original issue reported on code.google.com by e...@jana.com on 5 Jan 2012 at 8:40

Attachments:

GoogleCodeExporter commented 9 years ago
Patch merged into trunk.
Thanks!

Original comment by valdiic on 18 Feb 2012 at 9:02