Hi all

   I'm building an application which makes heavy use of data input
forms (add and edit). Of course I'd like to automatically generate my
forms basing on my data model. I've found that Django offers
'form_for_model' function which is very cool.
   Here is my problem: I've got two tables A and B where B is
dependent on A. It means that there is one to one realtionship between
the tables. I want to generate form for B table but I don't want to
show A_id (reference field) to my user. I'd like to make this field
hidden. How to do that?
    My current solution is to manually define 'fields' property in
'form_for_model' function call and manually render 'a_id.as_hidden' in
my template. I don't like this solution because i have to put all my
colums to 'form_for_model' call and do manual work to render hidden
field. Is there any other way to set value and rendering type for a
form's field?

Thanks in advance

--
Jakub Wisniowski


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to