'Determine the version of the SpatiaLite library.'

@cached_property
def spatial_version(self):

    try:
        version = self.spatialite_version_tuple()[1:]
    except Exception as msg:
        new_msg = ('Cannot    determine    the    SpatiaLite    version    for    the    "%s"    database    (error    was    "%s").        Was    the    SpatiaLite    initialization    SQL    loaded    on    this    database?' % (self.connection.settings_dict['NAME'], msg))
        six.reraise(ImproperlyConfigured, ImproperlyConfigured(new_msg), sys.exc_info()[2])
    if (version < (2, 3, 0)):
        raise ImproperlyConfigured('GeoDjango    only    supports    SpatiaLite    versions    2.3.0    and    above')
    return version
