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

dotenv keeps '\r' at end of variables in django #21

Closed
rlkelly opened this issue Feb 23, 2016 · 1 comment
Closed

dotenv keeps '\r' at end of variables in django #21

rlkelly opened this issue Feb 23, 2016 · 1 comment

Comments

@rlkelly
Copy link

rlkelly commented Feb 23, 2016

Is it possible to strip my variables when I from dotenv import load_dotenv it keeps the trailing '\r' on my variables which is breaking my build and I have to manually update my variables or call os.environ['env_variable'].strip().

How can I avoid this?

@rlkelly rlkelly closed this as completed Feb 23, 2016
@theskumar
Copy link
Owner

Hi @rlkelly, not sure if you meant to close this. .env file support variables in quotes, so this problem shouldn't arise. Try storing the variables as:

foo="bar"

Yes, we can remove the \r or \n from the variables, but I would not advise on using .strip() which also removes blank spaces.

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

2 participants