Reputation: 139
I am working on a GeoDjango project(first time working in a web app). Tring to use GeoManager but an error pops out saying module 'django.contrib.gis.db.models' has no attribute 'GeoManager'
. After that, I checked the release notes of Django 2.0 and found out that the GeoManager
and GeoQuerySet
classes are removed in Django 2.0.
Does anyone know which module is it in right now? Or can anyone suggest any better alternative
Upvotes: 2
Views: 2023
Reputation: 15738
They were deprecated in Django 1.9 as there are now functions that are replacing them.
From 1.9 changelog
All GeoQuerySet methods have been deprecated and replaced by equivalent database functions. As soon as the legacy methods have been replaced in your code, you should even be able to remove the special GeoManager from your GIS-enabled classes.
Upvotes: 2