Both computers have up to date code from svn, running save versions of python, postgresql, psycopg2, etc. However the following code works on the dev machine, but not on the production and I have no idea why.
---- On dev >>> from django.contrib.comments.models import FreeComment >>> from django.contrib.comments.models import FreeComment >>> from django.contrib.contenttypes.models import ContentType >>> from django.db.models import get_model >>> FreeComment.objects.filter(content_type=ContentType.objects.get(app_label='blog', >>> model='post')).order_by('-submit_date').values('object_id').distinct() [{'object_id': 1}] ---- On production >>> from django.contrib.comments.models import FreeComment >>> from django.contrib.contenttypes.models import ContentType >>> from django.db.models import get_model >>> FreeComment.objects.filter(content_type=ContentType.objects.get(app_label='blog', >>> model='post')).order_by('-submit_date').values('object_id').distinct() Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 108, in __repr__ return repr(self._get_data()) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 486, in _get_data self._result_cache = list(self.iterator()) File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 623, in iterator cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) File "/usr/lib/python2.5/site-packages/django/db/backends/util.py", line 18, in execute return self.cursor.execute(sql, params) ProgrammingError: for SELECT DISTINCT, ORDER BY expressions must appear in select list --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---