Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8487909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:23:02+00:00 2026-06-10T21:23:02+00:00

I know django 1.4 has functionality to remove Sensible information in error report.I am

  • 0

I know django 1.4 has functionality to remove Sensible information in error report.I am using django 1.3 and python 2.4.I want to know whether https://docs.djangoproject.com/en/dev/howto/error-reporting/#filtering-error-reports is back portable to django 1.3 and python 2.4.I tried with no success.please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:23:03+00:00Added an answer on June 10, 2026 at 9:23 pm

    I would just copy the sensitive_information decorator to a local decorators.py file, and use it.

    import functools
    
    
    def sensitive_variables(*variables):
     """
     Indicates which variables used in the decorated function are sensitive, so
     that those variables can later be treated in a special way, for example
     by hiding them when logging unhandled exceptions.
    
     Two forms are accepted:
    
    * with specified variable names:
    
        @sensitive_variables('user', 'password', 'credit_card')
        def my_function(user):
            password = user.pass_word
            credit_card = user.credit_card_number
            ...
    
    * without any specified variable names, in which case it is assumed that
      all variables are considered sensitive:
    
        @sensitive_variables()
        def my_function()
            ...
    """
     def decorator(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            if variables:
                wrapper.sensitive_variables = variables
            else:
                wrapper.sensitive_variables = '__ALL__'
            return func(*args, **kwargs)
        return wrapper
     return decorator
    

    usage:

    @sensitive_variables('user', 'pw', 'cc')
    def my_view(request):
      pass
    

    Would need functools.py too, which would not come with python2.4 by default (I guess) -you might have to include that file separately.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Django, I know using filter with multiple arguments gets translated into SQL AND
Using django, which is the way to check if data is present? I know
I would like to know how to show an error message in the Django
We are planning to develop something similar to LinkedIn using Python and Django. As
i know the django has some cache method such as the The per-site cache,The
I know Django has a feature of last_modified field (models.DateTimeField(auto_now_add=True) ).. but let's say
I have a App Engine/Python/Django application which has grown and been modified over the
I'm new to Django deployment and I want to know what are the steps
i know that django uses unicode strings all over the framework instead of normal
I know this isn't exactly Django templating philosophy, but i'd like to be able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.