> I am wondering if it is known what needs to be done to bring the > contrib.contenttypes functionality up to date in the gis branch. > Specifically I'm looking for the generic relation support.
I hadn't used or tried out generic relations until today, it's good stuff. The GIS branch is currently synced up with 0.96. One month ago, in r5172, generic relations were moved to django.contrib.contenttypes since they depend on that. This was a backwards incompatible change, as was noted by Malcolm: http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Genericrelationshavemoved When the GIS branch syncs back up to trunk, the syntax (as in the documentation) should be used. However, use the old syntax until then -- I have confirmed it works. For example, the following model uses a PointField for a generic relation: from django.contrib.gis.db import models from django.contrib.gis.geos import hex_to_wkt from django.contrib.contenttypes.models import ContentType class Point(models.Model, models.GeoMixin): point = models.PointField() content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() objects = models.GeoManager() def __str__(self): return hex_to_wkt(self.point) class Animal(models.Model): name = models.CharField(maxlength=50) points = models.GenericRelation(Point) def __str__(self): return self.name class Person(models.Model): name = models.CharField(maxlength=50) points = models.GenericRelation(Point) def __str__(self): return self.name -Justin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---