Skip to content

Tag: django

AssertionError: Cannot apply DjangoModelPermissionsOrAnonReadOnly

I have a problem with (I think) permissions. When I try to send post request via postman, I get following error: AssertionError: Cannot apply DjangoModelPermissionsOrAnonReadOnly on a view that does not set .queryset or have a .get_queryset() method. [29/Nov/2021 20:21:21] “POST /api/blog/category HTTP/…

Pass video uploaded via django to cv2

I am uploading video via django and want to process it using cv2. This is how video uploaded via django is accessed. Next i want to pass it to opencv. I dont want to save video in disk first and then acess it via cv2 using following code I tried passing this video_obj to VideoCapture this way But i got

Django NoReverseMatch error – urls.py path appears to match

In a Django application I am building as a project for an online course, I am expecting a link in one template (entry.html) to direct to a path (“edit”) in urls.py with a variable in the url. This should initiate a function called edit in views.py and render the template edit.html. I am getting a …