I have the below model. Departments, users. Users are assigned to a department. How can I restrict the access of templates based on the department_name of a use
I am trying to check if a user has a permission, which I have defined in the class Meta of the model, with a specific codename. At the moment I have: if reques