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
Returns the form class to use in this view.
dataset/ETHPy150Open c4all/c4all/c4all/settings/base.py/ensure_secret_key_file--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/views/generic/edit.py/ModelFormMixin.get_form_class