Skip to content

Commit

Permalink
Merge pull request #147 from fako/django-update
Browse files Browse the repository at this point in the history
Django update
  • Loading branch information
fako committed Nov 28, 2020
2 parents b7c3523 + abdd408 commit 5dd2deb
Show file tree
Hide file tree
Showing 67 changed files with 33 additions and 2,868 deletions.
2 changes: 2 additions & 0 deletions deploy/environments/development/invoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ datascope:
postgres:
credentials:
host: "127.0.0.1"
elastic_search:
host: "elastic"
2 changes: 2 additions & 0 deletions deploy/environments/production/invoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ datascope:
postgres:
credentials:
host: "127.0.0.1"
elastic_search:
host: "127.0.0.1"
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ services:
hard: -1
volumes:
- elastic-data:/usr/share/elasticsearch/data
#ports:
# - 127.0.0.1:9200:9200
ports:
- 9200:9200

adminer:
image: adminer
Expand Down
2 changes: 1 addition & 1 deletion src/datascope/requirements/development.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r minimal.txt

# Extended production dependencies
psycopg2-binary==2.8.4
psycopg2-binary==2.8.5
spacy==2.0.18
spacy-arguing-lexicon==0.0.3
IndicoIo==0.15.4
Expand Down
18 changes: 9 additions & 9 deletions src/datascope/requirements/minimal.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Django==1.11.29
whitenoise==5.0.1
Django==2.2.13
whitenoise==5.1.0
sqlparse==0.2.0 # raw sql queries
URLObject==2.4.0
celery==4.4.0
kombu==4.6.10
git+https://github.com/fako/django-json-field.git
djangorestframework==3.9.1
django-cors-headers==2.4.0
requests==2.20.0
djangorestframework==3.11.0
django-cors-headers==3.4.0
requests==2.24.0
six==1.11.0
jsonschema==2.4.0
html5lib==1.0b8
beautifulsoup4==4.6.0
beautifulsoup4==4.8.0
numpy==1.19.4
pandas==1.1.4
scipy==1.5.4
Expand All @@ -31,8 +32,7 @@ elasticsearch==6.0.0

# Debug and test
invoke==1.4.0
sentry-sdk==0.11.1
sentry-sdk==0.16.2
ipdb==0.8
ipython==6.1.0
mock==1.3.0
ipython==7.12.0
django-debug-toolbar==1.9.1
2 changes: 1 addition & 1 deletion src/datascope/requirements/production.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r minimal.txt

https://projects.unbit.it/downloads/uwsgi-lts.tar.gz
psycopg2-binary==2.8.4
psycopg2-binary==2.8.5
spacy==2.0.18
spacy-arguing-lexicon==0.0.3
IndicoIo==0.15.4
Expand Down
35 changes: 13 additions & 22 deletions src/datascope/settings_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,21 @@
ALLOWED_HOSTS = [
'.localhost',
'.globe-scope.com',
'.globe-scope.org',
'.globe-scope.info',
'.data-scope.com',
'.data-scope.org',
'.data-scope.info',
'.tools.wmflabs.org',
'37.139.16.242',
'ec2-34-251-167-142.eu-west-1.compute.amazonaws.com',
'.2ndhandstylist.com',
]
CORS_ORIGIN_WHITELIST = [
'localhost:9000',
'127.0.0.1:9000',
'10.0.2.2:9000',
'localhost:8080',
'127.0.0.1:8080',
'10.0.2.2:8080',
'data-scope.com',
'www.data-scope.com',
'globe-scope.com',
'www.globe-scope.com',
'debatkijker.nl',
'www.debatkijker.nl',
'2ndhandstylist.com',
'www.2ndhandstylist.com',
'http://localhost:9000',
'http://127.0.0.1:9000',
'http://10.0.2.2:9000',
'http://localhost:8080',
'http://127.0.0.1:8080',
'http://10.0.2.2:8080',
'https://data-scope.com',
'https://www.data-scope.com',
'http://globe-scope.com',
'http://www.globe-scope.com',
'https://debatkijker.nl',
'https://www.debatkijker.nl',
]

# Do not redirect when slashes at the end are missing
Expand Down Expand Up @@ -359,6 +349,7 @@
'en': 'english',
'nl': 'dutch'
}
ELASTIC_SEARCH_HOST = environment.elastic_search.host


# Sentry error reporting
Expand Down
2 changes: 1 addition & 1 deletion src/datascope/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
url(r'^data/v1/', include((legacy_patterns, "v1",))),
url(r'^api/v1/auth/token/?$', rest_views.obtain_auth_token),
url(r'^api/v1/', include((datagrowth_patterns, "api-v1",))),
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', admin.site.urls),
url(r'^health/?$', views.health_check),
]

Expand Down
83 changes: 0 additions & 83 deletions src/nautilus/migrations/0001_initial.py

This file was deleted.

46 changes: 0 additions & 46 deletions src/nautilus/migrations/0002_auto_20171119_1315.py

This file was deleted.

36 changes: 0 additions & 36 deletions src/nautilus/migrations/0003_auto_20181202_1424.py

This file was deleted.

24 changes: 0 additions & 24 deletions src/nautilus/migrations/0004_auto_20190402_0928.py

This file was deleted.

25 changes: 0 additions & 25 deletions src/nautilus/migrations/0005_alter_data_hash.py

This file was deleted.

26 changes: 0 additions & 26 deletions src/nautilus/migrations/0006_on_delete.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/online_discourse/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def get_es_client(silent=False):
"""
Returns the elasticsearch client which uses the configuration file
"""
es_client = Elasticsearch(["elastic"],
es_client = Elasticsearch([settings.ELASTIC_SEARCH_HOST],
scheme='http',
port=9200,
http_compress=True)
Expand Down
Loading

0 comments on commit 5dd2deb

Please sign in to comment.