First time here? Check out the FAQ!
0

Introduce new variables in settings.py
 

How can I add new variables and their defaults values to settings.py such that they get created in settings file during the installation time.

example:

show_widget = False

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
SocialQA's avatar
265
SocialQA
asked 11 years ago

Comments

see more comments

2 Answers

1

Adding variables to the setting template?

You'll need to modify the askbot/setup_templates/settings.mustache so that way when you create a new project your custom values will be on the project's settings.py file.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Fitoria's avatar
1.1k
Fitoria
answered 11 years ago
link

Comments

see more comments
1

Hello there, if you're asking about the settings that are available at the "settings" link, then have a look at how to create "overrides" for the livesettings django app.

Those actually can be also added to the template Adolfo mentioned.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 11 years ago, updated 11 years ago
link

Comments

Thanks its good to know about this option too.

SocialQA's avatar SocialQA (11 years ago)
see more comments