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

Move from env_file to dotenv (deprecated) #4180

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ CHANGELOG

**Documentation**

- Add authors, creators and last_author columns in displayed lists views and exports
- Add authors, creators and last_author columns in displayed lists views and exports

**Maintenance**

- Replace deprecated `env_file` with `dotenv`


2.109.0 (2024-08-08)
----------------------------
Expand Down
7 changes: 3 additions & 4 deletions geotrek/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import env_file
import os
import sys

from django.conf.global_settings import LANGUAGES as LANGUAGES_LIST
from django.contrib.gis.geos import fromstr
from django.contrib.messages import constants as messages
from django.conf.global_settings import LANGUAGES as LANGUAGES_LIST

from dotenv import load_dotenv
from easy_thumbnails.conf import Settings as easy_thumbnails_defaults

from geotrek import __version__
Expand Down Expand Up @@ -33,7 +32,7 @@ def api_bbox(bbox, buffer):

DOT_ENV_FILE = os.path.join(VAR_DIR, 'conf/env')
if os.path.exists(DOT_ENV_FILE):
env_file.load(path=DOT_ENV_FILE)
load_dotenv(DOT_ENV_FILE)

ALLOWED_HOSTS = os.getenv('SERVER_NAME', 'localhost').split(' ')
ALLOWED_HOSTS = ['*' if host == '_' else host for host in ALLOWED_HOSTS]
Expand Down
6 changes: 2 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ easy-thumbnails==2.8.5
# geotrek (setup.py)
# mapentity
# paperclip
env-file==2020.12.3
# via geotrek (setup.py)
filelock==3.15.4
# via django-large-image
fiona==1.9.4.post1
Expand Down Expand Up @@ -292,6 +290,8 @@ pyphen==0.11.0
# via weasyprint
python-dateutil==2.9.0.post0
# via celery
python-dotenv==1.0.0
# via geotrek (setup.py)
python-magic==0.4.27
# via paperclip
pytz==2023.3.post1
Expand Down Expand Up @@ -369,8 +369,6 @@ urllib3==2.2.2
# via
# requests
# sentry-sdk
values==2020.12.3
# via env-file
vine==5.1.0
# via
# amqp
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run(self):
'chardet',
'cairosvg',
'cairocffi',
'env_file',
'python-dotenv',
# pinned by requirements.txt
'pymemcache',
'coreschema',
Expand Down
Loading