try:
subpath = reverse(view_name, urlconf=self, args=args or [], kwargs=kwargs or {})
- except NoReverseMatch:
- raise ViewCanNotProvideSubpath
+ except NoReverseMatch, e:
+ raise ViewCanNotProvideSubpath(e.message)
if node is not None:
return node.construct_url(subpath)
try:
self.get_target_url()
- except NoReverseMatch, e:
+ except (NoReverseMatch, ViewCanNotProvideSubpath), e:
raise ValidationError(e.message)
super(TargetURLModel, self).clean()