I have a below class as an Admin option for the newform-admin.
class JobInfoOptions(admin.ModelAdmin):
def add_view(self, request):
if request.method == "POST" and not request.POST['job_title']
and request.POST['status'] != "I":
raise forms.ValidationError('Status can only be set to
"Inactive" if Job Title is not provided.')
return super(MyModelOptions, self).add_view(request)
How do I add the error message to the errors list? (errors.add('Status
can only be set to "Inactive" if Job Title is not provided.',
statusFieldReference))
Or am I doing this incorrectly?
-Alen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---