Error: One or more models did not validate:
maps.parking: 'layer_id' has a relation with model sdr_layer.Sdr_layer, which has either not been installed or is abstract.
This is the error that I have .
My maps/models.py looks like this
# This is an auto-generated Django model module created by ogrinspect.
from django.contrib.gis.db import models
class Parking(models.Model):
layer_id= models.ForeignKey(sdr_layer.Sdr_layer)
name = models.CharField(max_length=80)
descriptio = models.CharField(max_length=80)
geom = models.PointField(srid=4326)
objects = models.GeoManager()
# Auto-generated `LayerMapping` dictionary for Parking model
parking_mapping = {
'name' : 'Name',
'descriptio' : 'Descriptio',
'geom' : 'POINT25D',
}
Where sdr_layer/models.py looks like this
from django.db import models
class Sdr_Layer(models.Model):
layer_name = models.CharField(max_length = 100)
layer_attribute_name = models.CharField(max_length = 100)
I basically want the Sdr_layer.id to act as the foreign key for the app maps .
Make sure sdr_layer is listed your INSTALLED_APPS in settings.py