Hi Everybody, Kindly help me out.
My views.py file is: def video_detail_view(request): obj = str(Video.objects.get(id=id)) print(obj) context = { "object": obj } return render(request, "deploy/list_view.html", context) def video_list_view(request): queryset = Video.objects.all() print(queryset) for obj in queryset: print(obj.Video_Description, obj.videofile) context = { "object_list": queryset } return render(request, "deploy/detail_view.html", context) The models.py file is: class Video(models.Model): Video_Description= models.CharField(max_length=500) videofile= models.FileField(upload_to='videos/', null=True, verbose_name="") def __str__(self): return self.Video_Description + ": " + str(self.videofile) The error I am getting is: int() argument must be a string, a bytes-like object or a number not 'builtin_function_or_method'. The error is in views.py file in obj = str(Video.objects.get(id=id)). Kindly help me out. Thank you Best Aakash -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALr9hQ0c%2Bn5VYCzP24XSekY8R%3DSZ2bORWWRjH31o2hsWM_s%3DWg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.