Hi Tobias, Dne sobota 14. března 2020 9:44:16 UTC+1 Tobias Bengfort napsal(a): > > > Another option could be to add system checks for this: Instead of > silently "fixing" missing code it would inform developers about missing > decorators/mixins. (If I have time I might try to come up with a > prototype of this.)
my thinking about this is exactly the same as yours. I have seen issues with developers forgetting to add LoginRequiredMixin almost on all projects I worked on and I think all of this issues would have been prevented if the developers were force to explicitly specify the desired authentication requirements for each view (probably using the checks system). In my current project we added a testcase to go through all urls in urlconf and compare then to whitelist of public urls. But it is ugly as it hardcodes urls as strings (similar to the django-utils repo) defeating the flexibility of url patterns. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4c13eb8d-eb6a-4973-be4d-5abe0fc55bb9%40googlegroups.com.