diff --git a/django/views/generic/create_update.py b/django/views/generic/create_update.py index 4fe639f321..a64915298f 100644 --- a/django/views/generic/create_update.py +++ b/django/views/generic/create_update.py @@ -15,11 +15,11 @@ def deprecate_follow(follow): needed for newforms-based forms. """ if follow is not None: - import warning + import warnings msg = ("Generic views have been changed to use newforms, and the" "'follow' argument is no longer used. Please update your code" "to not use the 'follow' argument.") - warning.warn(msg, DeprecationWarning, stacklevel=3) + warnings.warn(msg, DeprecationWarning, stacklevel=3) def apply_extra_context(extra_context, context): """