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

Any plan to support embedded variables? #421

Closed
sylvainletourneau opened this issue Oct 7, 2022 · 1 comment
Closed

Any plan to support embedded variables? #421

sylvainletourneau opened this issue Oct 7, 2022 · 1 comment

Comments

@sylvainletourneau
Copy link

I was wondering if there has been discussions/plans to support embedded variables in .env file. For example,

# .env file with embedded variables
LIB_PATH=/home/username/.lib
GDAL_LIBRARY_PATH=${LIB_PATH}/osgeo/gdal304.dll
GEOS_LIBRARY_PATH=${LIB_PATH}/osgeo/geos_c.dll

I got used to the ${VAR_NAME} syntax as it is supported by docker-compose and python-dotenv among others. It would be great to get the same support in django-environ. I'm aware of the interpolate feature which covers a more limited use case.

Would that be useful to anyone else?

@sylvainletourneau
Copy link
Author

sylvainletourneau commented Oct 12, 2022 via email

invasy added a commit to invasy/django-environ that referenced this issue Jan 8, 2023
Fix joke2k#421: add support for embedded variables.
invasy added a commit to invasy/django-environ that referenced this issue Jan 8, 2023
Fix joke2k#421: add support for embedded variables.
@sergeyklay sergeyklay added the invalid This doesn't seem right label Mar 2, 2023
@sergeyklay sergeyklay reopened this Mar 2, 2023
@sergeyklay sergeyklay removed the invalid This doesn't seem right label Mar 2, 2023
invasy added a commit to invasy/django-environ that referenced this issue Apr 24, 2023
- Expand variables referenced as `$VAR` or `${VAR}`.
- Detect infinite recursion in expansion (self-reference).
@joke2k joke2k closed this as completed in c61bfb0 Aug 30, 2023
sergeyklay added a commit that referenced this issue Sep 1, 2023
sergeyklay added a commit that referenced this issue Sep 1, 2023
sergeyklay added a commit that referenced this issue Sep 1, 2023
fdemmer added a commit to fdemmer/django-environ that referenced this issue Mar 17, 2024
* develop:
  Test on Django 5.0
  Bump actions/setup-python from 4.7.0 to 4.7.1
  Bump actions/checkout from 4.0.0 to 4.1.1
  Add Python 3.12 to the test matrix
  Make inline comments handling optional and disabled by default
  Bump actions/checkout from 3.6.0 to 4.0.0
  Change version: v0.12.0 -> v0.11.2
  Change version: v0.12.0 -> v0.11.2
  Update change log
  Revert "Add variable expansion (fix joke2k#421)"
  Bump version
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

Successfully merging a pull request may close this issue.

2 participants