Hello, I am trying to get some sort of validation inline for the
admin:
class InlineForm(forms.ModelForm):
class Meta:
model = Inline
def clean(self):
if ...
raise forms.ValidationError('Error message here.')
return self.cleaned_data
class StuffInline(admin.TabularInline):
model = Inline
form = InlineForm
extra = 6
class FormAdmin(admin.ModelAdmin):
inlines = [StuffInline]
admin.site.register(Form, FormAdmin)
The validation works just fine, but it does not seem to show the error
message anywhere but at the top, and then only a "correct following
errors:" message with no following errors.
Am I doing this correctly or is this a bug?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---