At 06:00 PM 10/10/2007, Joseph Kocherhans  wrote:
> > >You're probably right. Something like radio_admin_fields on the
> > >ModelAdmin class sounds reasonable. Could you file a ticket for this
> > >so we don't lose track? I don't recall seeing one, but I could be
> > >wrong.
> >
> > I couldn't find one either, so I opened one:
> >
> > http://code.djangoproject.com/ticket/5731
> >
> > I'll probably take a look at what's involved in doing it, but given
> > my unfamiliarity with the code it's quite possible someone else could
> > whip up a patch sooner.
>
>Here's a hint that will hopefully help you (or anyone else really) get
>started: this should probably happen in the formfield_for_dbfield
>method of the ModelAdmin class.

Upon further investigation I'm not sure a replacement for radio_admin 
is needed in newforms-admin.  It seems the capability already exists, 
since the user can supply their own custom widgets by overriding 
formfield_for_dbfield.  This thread shows it is already being done by 
some people:

<http://groups.google.com/group/django-developers/browse_thread/thread/722ccaa9725293d0/4b52df7a428cb042?lnk=gst&q=RadioSelect&rnum=1#4b52df7a428cb042>http://groups.google.com/group/django-developers/browse_thread/thread/722ccaa9725293d0/4b52df7a428cb042?lnk=gst&q=RadioSelect&rnum=1#4b52df7a428cb042
 


It may not be as easy, and it may not be possible for the user to get 
it to look quite exactly like it did in the old scheme, but the basic 
capability exists.  So perhaps all that is needed is to remove the 
old radio_admin Field attribute?

(Before I discovered this I did get it working by adding support for 
"radio_admin_fields" in a manner very similar to how "raw_id_fields" 
is done, and it's not a lot of code or anything too hairy.  But 
coming to newforms-admin without the legacy of the old way, I think 
I'd wonder why there's this "radio_admin_fields" special case when 
the design supports a more general and flexible solution.)

Thoughts?

Karen


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

Reply via email to