Hi, i solved : i have to use userpathfile = FileStore.objects.filter(username=user) instead userpathfile = FileStore.objects.get(username=user)
Thanks Francesco >----Messaggio originale---- >Da: [email protected] >Data: 17/07/2012 14.49 >A: <[email protected]> >Ogg: 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 [email protected]. >To unsubscribe from this group, send email to django- [email protected]. >For more options, visit this group at http://groups.google.com/group/django- users?hl=en. > > -- 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.

