Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Customzing form fields in Admin in list_editable mode?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adam V.  
View profile  
 More options Jun 18 2009, 3:38 pm
From: "Adam V." <fla...@gmail.com>
Date: Thu, 18 Jun 2009 12:38:32 -0700 (PDT)
Local: Thurs, Jun 18 2009 3:38 pm
Subject: Customzing form fields in Admin in list_editable mode?
When enabling bulk edit mode for an Admin list view, is it possible to
control the widgets used? For the normal editor you can of course
specify a custom form, but I'm not seeing a way to customize the
fields in the list view.

Basically, I want to specify that some text fields fields in the list
view render shorter than the default.

I can hack this in with some fairly gross after-the-fact client-side
JavaScript, but I'd rather be able to specify this behavior in my
admin.ModelAdmin if the ability exists.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Gaynor  
View profile  
 More options Jun 18 2009, 3:40 pm
From: Alex Gaynor <alex.gay...@gmail.com>
Date: Thu, 18 Jun 2009 14:40:28 -0500
Local: Thurs, Jun 18 2009 3:40 pm
Subject: Re: Customzing form fields in Admin in list_editable mode?

Unfortunately there isn't a super good way to do this.  list_editalbe uses
the formfield_for_dbfield option just like rendering the normal form does,
however this obviously doesn't give you a ton of flexibility.  One thing you
could do for now, until we fix this, is to check the URL of the request
object that formfield_for_dbfield gets.

Alex

--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam V.  
View profile  
 More options Jun 18 2009, 4:21 pm
From: "Adam V." <fla...@gmail.com>
Date: Thu, 18 Jun 2009 13:21:25 -0700 (PDT)
Local: Thurs, Jun 18 2009 4:21 pm
Subject: Re: Customzing form fields in Admin in list_editable mode?
Alex, thanks; that's what I was afraid of.
If no one else has, I'd be willing to take a stab at a patch for 1.2.

On Jun 18, 12:40 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Gaynor  
View profile  
 More options Jun 18 2009, 4:24 pm
From: Alex Gaynor <alex.gay...@gmail.com>
Date: Thu, 18 Jun 2009 15:24:48 -0500
Local: Thurs, Jun 18 2009 4:24 pm
Subject: Re: Customzing form fields in Admin in list_editable mode?

Yeah, my instinct for the patch would just be to create a new method,
formfield_for_dbfield_for_list_editable (but with a better name ;) ) and
have it by defualt just call formfield_for_dbfield and make the
list_editable form creation use it.  Then by default people will see the
same behavior, but there will be a specific method users can override to
change it.  If you're interested in working on a patch I'd be more than
happy to look it over, although as you've said, it won't make it in until
1.2.

Alex

--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam V.  
View profile  
 More options Aug 6 2009, 4:34 pm
From: "Adam V." <fla...@gmail.com>
Date: Thu, 6 Aug 2009 13:34:49 -0700 (PDT)
Local: Thurs, Aug 6 2009 4:34 pm
Subject: Re: Customzing form fields in Admin in list_editable mode?
Bug entered w/ patch: http://code.djangoproject.com/ticket/11651

On Jun 18, 1:24 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »