Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
c424ff4b
Commit
c424ff4b
authored
Nov 02, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean django settings
parent
edeb85ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
64 deletions
+68
-64
settings.py
gargantext/settings.py
+68
-64
No files found.
gargantext/settings.py
View file @
c424ff4b
...
@@ -26,26 +26,9 @@ SECRET_KEY = '!%ktkh981)piil1%t5r0g4$^0=uvdafk!=f2x8djxy7_gq(n5%'
...
@@ -26,26 +26,9 @@ SECRET_KEY = '!%ktkh981)piil1%t5r0g4$^0=uvdafk!=f2x8djxy7_gq(n5%'
DEBUG
=
True
DEBUG
=
True
MAINTENANCE
=
False
MAINTENANCE
=
False
BASE_URL
=
"testing.gargantext.org"
ALLOWED_HOSTS
=
[]
ALLOWED_HOSTS
=
[
"localhost"
,
".gargantext.org"
,
".iscpif.fr"
,]
# Asynchronous tasks
import
djcelery
djcelery
.
setup_loader
()
BROKER_URL
=
'amqp://guest:guest@localhost:5672/'
CELERY_ACCEPT_CONTENT
=
[
'pickle'
,
'json'
,
'msgpack'
,
'yaml'
]
CELERY_TIMEZONE
=
'Europe/Paris'
CELERYBEAT_SCHEDULER
=
'djcelery.schedulers.DatabaseScheduler'
CELERY_IMPORTS
=
(
"gargantext.util.toolchain"
,
"gargantext.util.crawlers"
,
"gargantext.util.ngramlists_tools"
,
)
# Application definition
# Application definition
INSTALLED_APPS
=
[
INSTALLED_APPS
=
[
...
@@ -91,42 +74,6 @@ TEMPLATES = [
...
@@ -91,42 +74,6 @@ TEMPLATES = [
WSGI_APPLICATION
=
'gargantext.wsgi.application'
WSGI_APPLICATION
=
'gargantext.wsgi.application'
# http://getblimp.github.io/django-rest-framework-jwt/#additional-settings
REST_FRAMEWORK
=
{
'DEFAULT_PERMISSION_CLASSES'
:
(
'rest_framework.permissions.IsAuthenticated'
,
),
'DEFAULT_AUTHENTICATION_CLASSES'
:
(
'rest_framework_jwt.authentication.JSONWebTokenAuthentication'
,
'rest_framework.authentication.SessionAuthentication'
,
'rest_framework.authentication.BasicAuthentication'
,
),
}
JWT_AUTH
=
{
'JWT_VERIFY_EXPIRATION'
:
False
,
'JWT_SECRET_KEY'
:
SECRET_KEY
,
'JWT_AUTH_HEADER_PREFIX'
:
'Bearer'
,
}
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/
STATIC_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'static'
)
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
(
os
.
path
.
join
(
BASE_DIR
,
'gargantext/static'
),
)
STATICFILES_FINDERS
=
(
'django.contrib.staticfiles.finders.AppDirectoriesFinder'
,
'django.contrib.staticfiles.finders.FileSystemFinder'
,
)
MEDIA_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'media'
)
MEDIA_URL
=
'/media/'
# Database
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
...
@@ -166,16 +113,6 @@ AUTH_PASSWORD_VALIDATORS = [
...
@@ -166,16 +113,6 @@ AUTH_PASSWORD_VALIDATORS = [
},
},
]
]
API_TOKENS
=
{
"CERN"
:
{
"APIKEY"
:
'b8514451-82d1-408e-a855-56d342a0b5f8'
,
"APISECRET"
:
'6680b13e-2b5a-4fba-8c0e-408884d5b904'
,
},
"MULTIVAC"
:
{
"APIKEY"
:
"3a8ca010-1dff-11e7-97ef-a1a6aa4c2352"
}
}
# Internationalization
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
# https://docs.djangoproject.com/en/1.9/topics/i18n/
...
@@ -189,5 +126,72 @@ USE_L10N = True
...
@@ -189,5 +126,72 @@ USE_L10N = True
USE_TZ
=
True
USE_TZ
=
True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
STATIC_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'static'
)
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
(
os
.
path
.
join
(
BASE_DIR
,
'gargantext/static'
),
)
STATICFILES_FINDERS
=
(
'django.contrib.staticfiles.finders.AppDirectoriesFinder'
,
'django.contrib.staticfiles.finders.FileSystemFinder'
,
)
MEDIA_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'media'
)
MEDIA_URL
=
'/media/'
# Asynchronous tasks
import
djcelery
djcelery
.
setup_loader
()
BROKER_URL
=
'amqp://guest:guest@localhost:5672/'
CELERY_ACCEPT_CONTENT
=
[
'pickle'
,
'json'
,
'msgpack'
,
'yaml'
]
CELERY_TIMEZONE
=
'Europe/Paris'
CELERYBEAT_SCHEDULER
=
'djcelery.schedulers.DatabaseScheduler'
CELERY_IMPORTS
=
(
"gargantext.util.toolchain"
,
"gargantext.util.crawlers"
,
"gargantext.util.ngramlists_tools"
,
)
# REST-API
# See http://getblimp.github.io/django-rest-framework-jwt/#additional-settings
REST_FRAMEWORK
=
{
'DEFAULT_PERMISSION_CLASSES'
:
(
'rest_framework.permissions.IsAuthenticated'
,
),
'DEFAULT_AUTHENTICATION_CLASSES'
:
(
'rest_framework_jwt.authentication.JSONWebTokenAuthentication'
,
'rest_framework.authentication.SessionAuthentication'
,
'rest_framework.authentication.BasicAuthentication'
,
),
}
JWT_AUTH
=
{
'JWT_VERIFY_EXPIRATION'
:
False
,
'JWT_SECRET_KEY'
:
SECRET_KEY
,
'JWT_AUTH_HEADER_PREFIX'
:
'Bearer'
,
}
# Third-party web APIs
API_TOKENS
=
{
"CERN"
:
{
"APIKEY"
:
'b8514451-82d1-408e-a855-56d342a0b5f8'
,
"APISECRET"
:
'6680b13e-2b5a-4fba-8c0e-408884d5b904'
,
},
"MULTIVAC"
:
{
"APIKEY"
:
"3a8ca010-1dff-11e7-97ef-a1a6aa4c2352"
}
}
# BOOL Interpreter
# BOOL Interpreter
BOOL_TOOLS_PATH
=
"/srv/gargantext/gargantext/util/crawlers/sparql"
BOOL_TOOLS_PATH
=
"/srv/gargantext/gargantext/util/crawlers/sparql"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment