hi, I have a view which extracts words from another table and saves them into the words table. My code is like this:
w = Word(word=wd,written=False, language=lng) w.save() since 'word' is unique, to avoid a referential integrity error I do: tst = Word.objects.get(word = wd) if not tst: w.save() but I get this error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in _real_get_response 81. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.4/site-packages/arichuvadi/web/views.py" in lessontodict 167. tst = Word.objects.get(word = wd) File "/usr/lib/python2.4/site-packages/django/db/models/manager.py" in get 69. return self.get_query_set().get(*args, **kwargs) File "/usr/lib/python2.4/site-packages/django/db/models/query.py" in get 263. raise self.model.DoesNotExist, "%s matching query does not exist." % self.model._meta.object_name DoesNotExist at /web/update/ Word matching query does not exist. I just cant figure out what this error means -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---