Commit 1e6d53b7 authored by sim's avatar sim

[CONF] Move django secrets and local settings in gargantext.ini

parent 267d4954
...@@ -20,6 +20,7 @@ SQLAlchemy-Utils = "*" ...@@ -20,6 +20,7 @@ SQLAlchemy-Utils = "*"
django-celery = "*" django-celery = "*"
djangorestframework = "*" djangorestframework = "*"
djangorestframework-jwt = "*" djangorestframework-jwt = "*"
python-decouple = "*"
[requires] [requires]
......
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "812bbbd579361fcd66f99a5fe8a453e712b008fcabd276b4cc803c955a3fc14c" "sha256": "53e18b75e4a0cfdcafd2ff47bd1d6772a5638f975b59fe95f4575e4086f60346"
}, },
"host-environment-markers": { "host-environment-markers": {
"implementation_name": "cpython", "implementation_name": "cpython",
...@@ -160,6 +160,12 @@ ...@@ -160,6 +160,12 @@
], ],
"version": "==2.6.1" "version": "==2.6.1"
}, },
"python-decouple": {
"hashes": [
"sha256:1317df14b43efee4337a4aa02914bf004f010cd56d6c4bd894e6474ec8c4fe2d"
],
"version": "==3.1"
},
"pytz": { "pytz": {
"hashes": [ "hashes": [
"sha256:80af0f3008046b9975242012a985f04c5df1f01eed4ec1633d56cc47a75a6a48", "sha256:80af0f3008046b9975242012a985f04c5df1f01eed4ec1633d56cc47a75a6a48",
......
# django.ini file [django]
[uwsgi]
DEBUG = True
SECRET_KEY = !%ktkh981)piil1%t5r0g4$^0=uvdafk!=f2x8djxy7_gq(n5%
DB_PASS = C8kdcUrAQy66U
[uwsgi]
env = DJANGO_SETTINGS_MODULE=gargantext.settings env = DJANGO_SETTINGS_MODULE=gargantext.settings
#module = django.core.handlers.wsgi:WSGIHandler() #module = django.core.handlers.wsgi:WSGIHandler()
......
from configparser import RawConfigParser
from decouple import AutoConfig, RepositoryIni
class GargantextIni(RepositoryIni):
SECTION = 'django'
def __init__(self, source):
self.parser = RawConfigParser()
with open(source) as file_:
self.parser.readfp(file_)
class GargantextConfig(AutoConfig):
SUPPORTED = {'gargantext.ini': GargantextIni}
config = GargantextConfig(search_path='.')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment