I have

class NewEventForm(ModelForm):
    Event_name = forms.CharField(label='Event
Name*',widget=forms.TextInput(attrs={'size':'82','maxlength':'100','tabindex':'1'}),error_messages={'required':'!
You must enter Event Name.'})
    description=forms.CharField(label='Event Description*',
widget=TinyMCE(attrs={'cols': 90, 'rows':
20,'tabindex':'2'}),error_messages={'required':'! You must enter a
Description.'})
 class Meta:
        model= Event

I want to
1)  Pass  session to the form
2) Customize
       a)  message text as in "error_messages={'required':'! You must
enter Event Name.'}"  based on certain settings in session.
       b) value of label based on certain session settings as in -
label='Event Name*',

and I want to do it for all the forms in my application. What would
the best and least repetitive way to do it. I have around 20 forms.

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

Reply via email to