def ensure_secret_key_file():
    secret_path = os.path.join(ABS_PATH('settings'), 'secret.py')
    if not os.path.exists(secret_path):
        from django.utils.crypto import get_random_string
        secret_key = get_random_string(
            50,
            'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
        )
        with open(secret_path, 'w') as f:
            f.write("SECRET_KEY = " + repr(secret_key) + "\n")

# Import the secret key
Checks that secret.py exists in settings dir. If not, creates one
dataset/ETHPy150Open c4all/c4all/c4all/settings/base.py/ensure_secret_key_file