Need help giving superuser different access

Hello all new developer here,

I am working with existing code base and want to fix an issue in the system. Here is the problem:

When a superuser logs into the site and selects a product, he is charged and I have to implement a 100% discount to his price so he doesn’t have to pay. This is inefficient and I want to do it another way.

How can I change this so that a superuser can select a product, and bypass the payment section? Here is some code for reference along with the mixins being used:

Code snippets:

You can generally check request.user.is_superuser to determine whether the current request is being made from someone who is a superuser.

You can then add that logic at the appropriate places within the flow of your application as needed.

(To properly make a detailed recommendatation, we’d need to see a lot more of your application to identify the “best” location for the addition of that logic.)

Hello Ken thanks for reaching out. What parts of my application would you like to see? Id really appreciate the help!