On 01/25/2015 08:45 AM, Riccardo Di Virgilio wrote:
sorry the code you need to write with my solution in your settings
file would be
class Settings(object):
@property
def SECRET_KEY(self):
if self.DEBUG:
return "abcd"
return "12345"
I'll take a look
On 01/24/2015 10:56 AM, Marc Tamlyn wrote:
I'm not sure what the benefit here would be - the settings are
evaluated at start up time, not on every request and the server would
need to be restarted for it to change.
A patch to db.connections which allows the username and password to be
looked
sorry the code you need to write with my solution in your settings file
would be
class Settings(object):
@property
def SECRET_KEY(self):
if self.DEBUG:
return "abcd"
return "12345"
On Sunday, January 25, 2015 at 2:38:29 PM UTC+1, Riccardo Di Virgilio
What you can try to do without modifying django code is to use custom
settings class, which is a documented feature.
https://docs.djangoproject.com/en/1.7/topics/settings/#custom-default-settings
I'm doing that for my application, using a class that is using @property
decorator to build
I'm not sure what the benefit here would be - the settings are evaluated at
start up time, not on every request and the server would need to be
restarted for it to change.
A patch to db.connections which allows the username and password to be
looked up on each new connection might be interesting,
Hello Django devs,
I would like to see if Django can support setting the SECRET_KEY and
database creds as callables. Let me explain my situation.
Here at Amazon, we use a system to store and fetch secrets such as a
Django SECRET_KEY and database creds. There's a Python component to this