svpbde / svpb

Some simple Django webapps for our sailing club
Apache License 2.0
0 stars 0 forks source link

Use UserPassesTextMixins #35

Open transistortim opened 9 months ago

transistortim commented 9 months ago

In Django 1.8, permissions to class-based views had to be applied by decorating the dispatch method. This is what is currently done in our code. In Django 1.9, UserPassesTestMixin was introduced, which appears a bit more straightforward to me and is mentioned in the offical docs from Django 1.10 on, while doc on decorating dispatch was removed.

If there are no side effects, we could update our Mixins accordingly.