0

I know there is way to do by creating local_settings.py and production_settings.py but don't know how to use it!

Can anyone help me out through this problem?

Aniket Pawar
  • 2,641
  • 19
  • 32
  • Please find your answer here http://stackoverflow.com/a/15325966/3762142 and if you have any doubt then do not hesitate to modify your question – Raja Simon Jan 22 '16 at 07:23
  • Yes,debug=false is there but how to deal with secret key? by using os environment solves problem? If it then how to use os environment with secret key and email passwords? – Aniket Pawar Jan 22 '16 at 07:31

1 Answers1

1

Answering your question. You have to export environment variable first.

$ export secret_key=wioj23423jij2

And in your code you can get the secret key using

import os
secret_key = os.environ.get('secret_key')
Raja Simon
  • 10,126
  • 5
  • 43
  • 74