I am working with Django Rest Framework, and each time there is a request resulting in 405 Method Not Allowed, an annoying warning will be printed in the console. I wonder if I can opt to silent this warning, since it is rather not helpful in my settings.
Asked
Active
Viewed 218 times
2
-
Are you running in debug mode ? – Umair Mohammad Mar 08 '20 at 06:13
-
@UmairMohammad Yes, I am. Is that the reason? If it is, is there any way I can suppress it, so when I run tests, they don't come up bothering. – jackxujh Mar 08 '20 at 06:33
-
Maybe try changing log level or something ? Ideally, I would have tried fixing those warnings instead of suppressing them. – Umair Mohammad Mar 08 '20 at 06:53
-
1No, those warnings are there because I had some tests to explicitly access some recourses using forbidden methods, and I am using the assertions with status codes to check that, so it does not make things more helpful to see those warnings in the console. – jackxujh Mar 08 '20 at 06:59
-
Had the same issues with tests and suggestions [here](https://stackoverflow.com/questions/6377231) helped. – Jen Nov 05 '21 at 03:09