I want to set this variable for a ModelForm
class BaseModel(models.Model):
a_id = models.IntegerField(primary_key = True, editable = False)
class MyForm(ModelForm):
class Meta:
model = BaseModel
In my template
{% if field.is_hidden %}
{{ field }}
{% else %}
<tr>
<td>{{ field.errors }} {{ field.label_tag }}</label></
td>
<td>{{ field }}</td>
</tr>
{% endif %}
I want a_id to be a hidden variable in the page, ofcourse I have to
remove the editable = False.
But I am unable to set the is_hidden variable.. Sounds so simple.. But
cant figure out
Thanks,
Ramya
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---