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
-
Install django-devsafe
pip install django-devsafe
-
Add "devsafe" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'devsafe', )
-
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']
-
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.