Closed deandrebaker closed 3 years ago
We tend to use the same 6 class decorators over ever model view set class, with the only difference being the list of strings representing the tags.
We should create a new class decorator that takes in a parameter representing the list of tags, and applies all 6 of these decorators to the class.
We can then repeat for these 2 decorators as well.
To create a decorator in python, checkout https://www.geeksforgeeks.org/chain-multiple-decorators-in-python/
We tend to use the same 6 class decorators over ever model view set class, with the only difference being the list of strings representing the tags.
We should create a new class decorator that takes in a parameter representing the list of tags, and applies all 6 of these decorators to the class.
We can then repeat for these 2 decorators as well.
To create a decorator in python, checkout https://www.geeksforgeeks.org/chain-multiple-decorators-in-python/