How to Solve NameError: name 'RangeWidget' is not defined -- django_filters

Erorr: name 'RangeWidget' is not defined

NameError: name 'RangeWidget' is not defined

Solution: Import the 'RangeWidget' module

# Add the following line to the top of your code
from django_filters.widgets import RangeWidget

 

For more information:
django_filters RangeWidget