get() returned more than one ....
Hi all,
i have a question. In my Django views i used:
def getpath(request,user="test"):
userpathfile = FileStore.objects.get(username=user)
return userpathfile
my table FileStore contain 3 fields: id,username,path
I would like get all data from a user register (in my example "test" ) in
particular the values of path field and send the path of the files the i get to
a web page to manage some files.
I receive the below error message:
get() returned more than one FileSore -- it returned 2! Lookup parameters were
{'username': 'test'}
How i can solve it?
Thanks in advance
Francesco
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home