Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generowanie SECRET_KEY #10

Open
ghost opened this issue Apr 9, 2015 · 1 comment
Open

Generowanie SECRET_KEY #10

ghost opened this issue Apr 9, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 9, 2015

Do wygenerowania SECRET_KEY w settings.py można też wykorzystać get_random_string().
EX:

import string
from django.utils.crypto import get_random_string
allowed_chars = string.digits + string.ascii_letters + '!@#$%^&*(-_=+)'
key = get_random_string(64, allowed_chars)
@ghost
Copy link
Author

ghost commented Apr 11, 2015

Jeżeli SECRET_KEY będzie przechowywany jako zmienna środowiskowa allowed_chars nie może zaweirać $.

import string
from django.utils.crypto import get_random_string
allowed_chars = string.digits + string.ascii_letters + '@#%^&*(-_=+)'
key = get_random_string(64, allowed_chars)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants