tags:

views:

583

answers:

3

In the transition to newforms admin I'm having difficulty figuring out how specify core=False for ImageFields.

I get the following error:

TypeError: __init__() got an unexpected keyword argument 'core'

[Edit] However, by just removing the core argument I get a "This field is required." error in the admin interface on attempted submission. How does one accomplish what core=False is meant to do using newforms admin?

+2  A: 

This is simple. I started getting this problems a few revisions ago. Basically, just remove the "core=True" parameter in the ImageField in the models, and then follow the instructions here to convert to what the newforms admin uses.

dguaraglia
I figured that it had been removed, but I was curious as to how the alternative works. Nothing in that link immediately stands out as a replacement for core=False.
cdleary
+3  A: 

The core attribute isn't used anymore.

From Brian Rosner's Blog:

You can safely just remove any and all core arguments. They are no longer used. newforms-admin now provides a nice delete checkbox for exisiting instances in inlines.

Dan
+3  A: 

To get rid of "This field is required," you need to make it not required, by using blank=True (and possibly null=True as well, if it's not a CharField).

Carl Meyer