Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

266
Views
How to call django decorator only once per session?

i want to call custom decorator only once per session

def cust_decorator(function):
    def wrapper(request,*args, **kwargs):
       ........
       .......

wrapper.__doc__ = function.__doc__
wrapper.__name__ = function.__name__
return wrapper 

i want to call cust_decorator decorator only once per session for a particular user

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You could set a session variable when the decorator has been called for the first time and check for this value to determine if the alert should be shown again. Another way could be to write your own middleware.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!