django-devsafe

Safely work with a production database in an insecure environment.


License
MIT
Install
pip install django-devsafe==0.3.0

Documentation

django-devsafe

django-devsafe

Safely work with a production database in an insecure environment. django-devsafe scrambles sensitive user data so that you don't accidentally expose the private information of your users during testing.

Quick start

  1. Install django-devsafe

    pip install django-devsafe
  2. Add "devsafe" to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = (
      ...
      'devsafe',
    )
  3. Optionally, you can use your settings file to define additional profile fields to scramble. Your User object must have a get_profile() method to access these fields.

    DEVSAFE_FIELDS = ['secret_payment_token', 'secret_api_key']
  4. Invoke devsafe!

    python manage.py devsafe

Usage

Usage: manage.py devsafe [options] 

Scrambles your sensitive user data. By default, this just does email addresses and passwords. Omits superusers and staff.

EXAMPLE:

/manage.py devsafe

Options:
  --dry                 Dry run, does not actually scramble data. Default
                        False.
  --quiet               Be quiet. Default False.