Re: Is it possible to skip this field?

2009-08-10 Thread David

Great. Thanks Daniel!


On Aug 10, 3:04 pm, Daniel Roseman  wrote:
> On Aug 10, 10:58 pm, David  wrote:
>
>
>
>
>
> > Hello,
>
> > When I use the following code,
>
> >   
> >         
> >             {{ form.as_table }}
> >         
>
> > .
>
> > It prints all form fields with corresponding values on a user's
> > monitor. Now that in that form there is a field "username", for some
> > reasons I can not show this information to that user even though this
> > is his/her username. So, is there any way to skip printing this
> > field?
>
> > Any suggestions?
>
> > Thanks.
>
> Use 'exclude' in the form's Meta 
> class.http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a...
> --
> DR.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Is it possible to skip this field?

2009-08-10 Thread Daniel Roseman

On Aug 10, 10:58 pm, David  wrote:
> Hello,
>
> When I use the following code,
>
>   
>         
>             {{ form.as_table }}
>         
>
> .
>
> It prints all form fields with corresponding values on a user's
> monitor. Now that in that form there is a field "username", for some
> reasons I can not show this information to that user even though this
> is his/her username. So, is there any way to skip printing this
> field?
>
> Any suggestions?
>
> Thanks.

Use 'exclude' in the form's Meta class.
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a-subset-of-fields-on-the-form
--
DR.
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---