here is my model :
class company_profile(models.Model):
user=models.ForeignKey(User, unique=True)
company=models.CharField(max_length=200)
def __unicode__(self):
return self.company
and when i got django shell i did the following, it worked correctly :
from my_app.models import company_profile
everything = company_profile.objects.all()
# this gives me the correct out put of the existing company names ,
but when i do the following :
username = company_profile.objects.all().filer(user='rakesh')
this is the error , that i am getting :
ValueError: invalid literal for int() with base 10: 'rakesh'
how can i solve this , or is my query wrong.
filershould befilter.