1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Changed django.forms.ValidationError imports to django.core.exceptions.ValidationError.

Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
François Freitag
2020-02-12 14:48:49 +01:00
committed by Mariusz Felisiak
parent 2788de95e3
commit 9ef4a18dbe
48 changed files with 164 additions and 133 deletions

View File

@@ -1,5 +1,6 @@
from django import forms
from django.contrib import admin
from django.core.exceptions import ValidationError
from django.db import models
from .models import (
@@ -102,7 +103,7 @@ class TitleForm(forms.ModelForm):
title1 = cleaned_data.get("title1")
title2 = cleaned_data.get("title2")
if title1 != title2:
raise forms.ValidationError("The two titles must be the same")
raise ValidationError("The two titles must be the same")
return cleaned_data