How do I fix Django returning 'self' not defined NameError on queryset filtering of ModelChoiceField?
I have 2 models, Type and Measure. Each Measure object has a typeid ForeignKey field that refers to the id field of a Type object. Each Type is viewed on it’s own page where the id is passed through URL. urls.py urlpatterns = [ path(‘type/<int:id>’, views.type, name=’type’), ] The view had been working with this… Read More How do I fix Django returning 'self' not defined NameError on queryset filtering of ModelChoiceField?