> A few details on what "does not seems to work properly" looks like might > help people help you.
Thanks for your reply. You're absolutely right. Here are some more details: In the admin, when I try to save a catalog with more than one BadItem, I get the following error: Exception Value: ERROR: IN types character varying and integer cannot be matched SELECT "testapp_baditem"."name" FROM "testapp_baditem" WHERE "testapp_baditem"."name" IN (12,34) Exception Location: c:\Python25\Lib\site-packages\django\db\backends \postgresql\base.py in execute, line 43 I added the djangologging application, and saw that the first problematic SELECT is in main.change_stage, line 325. djangologging's relevant log output: SQL 11:49:35,187 main.change_stage:325 SELECT " testapp_baditem"."name" FROM "testapp_baditem" WHERE " testapp_baditem"."name" IN (12,34) 0 ms SQL 11:49:35,296 pprint._safe_repr:292 SELECT "testapp_baditem "."name" FROM "testapp_baditem" WHERE "testapp_baditem"." name" IN (12,34) 0 ms SQL 11:49:35,296 pprint._safe_repr:292 SELECT "testapp_baditem "."name" FROM "testapp_baditem" 0 ms SQL 11:49:35,296 pprint._safe_repr:292 SELECT "testapp_baditem "."name" FROM "testapp_baditem" WHERE "testapp_baditem"." name" IN (12,34) 0 ms ("main" is file django/contrib/admin/views/main.py) This is all with django-0.96.1, although django trunk version causes the same problems. I found something that may be related to this problem here: http://code.djangoproject.com/changeset/5647 The problem is, this is a bug fix in django-0.91, and the discussed file in this changeset (/django/core/meta/__init__.py) no longer exists. If there is more data that can help which I neglected, please let me know. > One thing I find odd is that you decided to limit your > CharField to only digits -- if you are going to do that, why not just > convert it to a numeric field instead? That would make it more like the > default primary key field, so might fix the problem. (Though I'm also not > sure how wise it is to be trying to use the name field as a primary key in > the first place.) When I did not limit the field to digits, and tried to add a single BadItem to the catalog, the add form gave me this error: "Enter only digits separated by commas." I guess It's related to the previous problem, since the admin may refer to these ID's as numeric instead of their real type, CharField in this example. This example is indeed a bit strange, but it's a simplified version of the original models. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---