+ def clean_fields(self, exclude=None):
+ try:
+ super(Page, self).clean_fields(exclude)
+ except ValidationError, e:
+ errors = e.message_dict
+ else:
+ errors = {}
+
+ if 'template' not in errors and 'template' not in exclude:
+ try:
+ self.template.clean_fields()
+ self.template.clean()
+ except ValidationError, e:
+ errors['template'] = e.messages
+
+ if errors:
+ raise ValidationError(errors)
+