On Mar 22, 8:15 am, Joshua Partogi <joshua.j...@gmail.com> wrote: > Dear all, > > I just encounter this error using pyscopg2 as my db adapter > Exception Type: ProgrammingError > Exception Value: can't adapt > Exception Location: > /usr/lib/python2.5/site-packages/django/db/backends/util.py in > execute, line 19 > > The query that I'm trying to run from admin is as such: > def save_model(self, request, obj, form, change): > user = User.objects.get(username=request.user) > > Does anybody know how I can run this with psycopg? What's wrong with > these statements? What did I miss here?
It would help if you posted your model. But from what you posted, I'm guessing that line needs to read: obj.user = User.objects.get(username=request.user) or maybe just obj.user = request.user --BN --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---