Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
mkone112 tell me how I do it.
To begin with, I will explain what local_settings.py is, it is a file with local settings where you can override any global setting (including SECRET_KEY). Its content looks something like this
from .settings import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
from .settings import *
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'Мой самый секретный ключ'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
$ python manage.py runserver --settings=myproject.local_settings
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question