Skip to content

Commit 10a64f9

Browse files
committed
[settings] Moved the settings files to a subfolder to avoid conflict with pip install --editable and other tools
1 parent 8e8aa06 commit 10a64f9

File tree

6 files changed

+4
-5
lines changed

6 files changed

+4
-5
lines changed

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ matrix:
4747
- DATABASE=_postgres
4848

4949
before_script:
50-
- export DJANGO_SETTINGS_MODULE=settings
5150
- export PYTHONPATH=$PYTHONPATH:$(pwd)
5251
# check gis
5352
- gdal-config --version
@@ -70,7 +69,7 @@ install:
7069
- pip install Django~=${DJANGO}.0
7170

7271
script:
73-
- pytest --create-db --reuse-db --no-migrations --ds=settings${DATABASE}
72+
- pytest --create-db --reuse-db --no-migrations --ds=ddf_settings.settings${DATABASE}
7473

7574
after_success:
7675
- coveralls
File renamed without changes.
File renamed without changes.
File renamed without changes.

manage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env python
22
try:
3-
import settings # Assumed to be in the same directory.
3+
import ddf_settings.settings # Assumed to be in the same directory.
44
except ImportError:
55
import sys
66
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
77
sys.exit(1)
88

99
if __name__ == "__main__":
1010
import os
11-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
11+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ddf_settings.settings")
1212
from django.core.management import execute_from_command_line
1313
execute_from_command_line()

pytest.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[pytest]
2-
DJANGO_SETTINGS_MODULE = settings
2+
DJANGO_SETTINGS_MODULE = ddf_settings.settings
33
addopts = --pyargs --create-db --reuse-db --no-migrations
44
python_files = test_*.py

0 commit comments

Comments
 (0)