[Answer]-Django complains that django.contrib.gis.measure.Distance is not a valid model

1👍

django.contrib.gis.measure import Distance is not a Model, it is just a class that extends MeasureBase that extends object.

class MeasureBase(object):¬                                                                                                                       
   STANDARD_UNIT = None¬
   ALIAS = {}¬
   UNITS = {}¬
   LALIAS = {}¬

So, “Why does Django think that Distance is not a valid model?” – because it isn’t a model. Models in Django are created by extending models.Model.

Leave a comment