Preston Holmes wrote:
> When using widget.attr how does one specify a attr that is name only,
> not key/value.
>
> The disabled key is not a k/v attr:
>
>
>
In xhtml 1 (fwiw) it is, you are required to write disabled="disabled"
(I think) and it is also allowed to do so in html 4
See section
On Fri, Oct 30, 2009 at 2:58 PM, Anthony Simonelli
wrote:
> On Fri, Oct 30, 2009 at 10:58 AM, Tom Evans wrote:
>> When you iterate through the fieldset, you should be iterating through form
>> instances. Because they are forms from a ModelFormSet, they will be
>> ModelForm instances, and so will
On Fri, Oct 30, 2009 at 4:36 PM, Preston Holmes wrote:
>
>
>
> On Oct 30, 12:00 pm, Bill Freeman wrote:
>> Yet another option is to write a widget that subclasses the existing
>> one, and adds
>> disabled='disabled' to the dictionary that will be used to populate
>> the attributes
>> (usually th
On Oct 30, 12:00 pm, Bill Freeman wrote:
> Yet another option is to write a widget that subclasses the existing
> one, and adds
> disabled='disabled' to the dictionary that will be used to populate
> the attributes
> (usually the 'attrs' argument, I think, and you will have to handle
> the poss
On Fri, Oct 30, 2009 at 10:58 AM, Tom Evans wrote:
> When you iterate through the fieldset, you should be iterating through form
> instances. Because they are forms from a ModelFormSet, they will be
> ModelForm instances, and so will have an instance attribute that you can use
> to output the fie
Yet another option is to write a widget that subclasses the existing
one, and adds
disabled='disabled' to the dictionary that will be used to populate
the attributes
(usually the 'attrs' argument, I think, and you will have to handle
the possibility
that you will be passed None instead of a dict).
When you iterate through the fieldset, you should be iterating through form
instances. Because they are forms from a ModelFormSet, they will be
ModelForm instances, and so will have an instance attribute that you can use
to output the fields you don't want in the form. You can then restrict the
fie
On Oct 30, 5:47 am, Anthony Simonelli wrote:
> Is there any way to display the fields as text rather than as input fields?
My suggestion would be to write your own widget that simply renders as
text, and make all the uneditable fields use that widget. Have a look
in the django code (django/form
Hello,
I am using a Model Formset because there are two foreign keys in my Model and
it makes it easy to create forms with them preselected from data in my model:
class ForecastActualSum(models.Model):
sales_rep = models.ForeignKey(SalesrepGrpname)
customer = models.ForeignKey(Customer)
9 matches
Mail list logo