How to remove Group field from Email Form

29 views
Skip to first unread message

nobody

unread,
Apr 18, 2014, 9:21:25 AM4/18/14
to django...@googlegroups.com
Hi,

In an email form template file, the following tag displays tree input fields, Subject, Body and Group, but I only need Subject and Body field, not the Group, how can I remove the Group field?

{% form_as_div form %}

Thank you.

Sergiy Khohlov

unread,
Apr 18, 2014, 9:27:01 AM4/18/14
to django-users
add exlude= ['Group'] to the form.py
Many thanks,

Serge


+380 636150445
skype: skhohlov
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/01227cd2-4cd5-4e3a-b73e-95590f4a61d1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Sergiy Khohlov

unread,
Jun 4, 2014, 10:36:49 AM6/4/14
to django-users
Could you please send your view.py form.py and template ... 

Many thanks,

Serge


+380 636150445
skype: skhohlov


On Sat, Apr 19, 2014 at 3:39 AM, nobody <jupit...@gmail.com> wrote:
Thanks Serge, please see following embedded comments.


On Friday, April 18, 2014 11:27:01 PM UTC+10, Sergiy Khohlov wrote:
add exlude=  ['Group'] to the form.py
Many thanks,


Hmm, I tried following at my forms.py:

from andsome.forms import EmailForm
class EmailForm(EmailForm):
     exclude = ['Group']
     def get_emails()
     .....

But no luck, it did not work, the Group still displayed.

Reply all
Reply to author
Forward
0 new messages