On Tue, Aug 17, 2010 at 1:34 AM, Jerry Stratton <goo...@hoboes.com> wrote:
> On Aug 16, 3:43 pm, Karen Tracey <kmtra...@gmail.com> wrote:
>> So yes, the ImproperlyConfigured error is something you will only get with
>> DEBUG on. But I would expect that the effect of the problem it identified
>> would be seen at some point when you try using the admin with DEBUG off.
>> That is, I'd expect you to hit some (possibly pretty cryptic) error at some
>> point, or find that not all the fields you are expecting are actually
>> listed, or something like that.
>
> In this case all four were displayed, in the order listed, and with
> the top two (title and category) grouped on the same line. I was able
> to add and edit several entries, until I started adding functionality
> that required me to turn DEBUG on and got that error. (I had hoped to
> use the simpler format so that it would be easier for our less Python-
> savvy team members to understand.)

I was going to point to the 'fields' documentation, which don't talk at
all being able to accept the nested tuples like the 'fields' option
inside 'fieldsets' elements does.

Then went to the admin source code and saw that the implementation of
'fields' defers to the 'fieldsets' one simply specifying a None in the
fieldset name and obviating any other option ('classes', 'description').

That explains why it works for you with DEBUG=False.

The obvious next step was to see how to remove the offending validation
code Karen described. Fortunately there is some duplicated code in that
zone that can be factored out. This means the feature you are using
could be officially added by removing code instead of adding it, plus
tests and documentation.

I've put a patch for this at [1]. Will try to get Django devs opinions
about if this is worth and open a ticket if so.

-- 
Ramiro Morales  |  http://rmorales.net

1. http://paste.pocoo.org/show/252613/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to