Hi,
I have the following model
class App(models.Model):
user = models.ForeignKey(User, unique=True, editable=False)
In a view I now want to check if a user is indeed in the database table. I
tried the following
user_exists = Application.objects.get(user='john')
But this give the following error:
invalid input syntax for integer: "john"
Any ideas on how to do this check?
Thanks,
Vincent
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---