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
3ca48164
Commit
3ca48164
authored
May 25, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into testing
parents
1d6784ac
fb898d38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
208 additions
and
0 deletions
+208
-0
settings.py
gargantext/settings.py
+208
-0
No files found.
gargantext/settings.py
0 → 100644
View file @
3ca48164
"""
Django settings for gargantext project.
Generated by 'django-admin startproject' using Django 1.9.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import
os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY
=
'!
%
ktkh981)piil1
%
t5r0g4$^0=uvdafk!=f2x8djxy7_gq(n5
%
'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
True
MAINTENANCE
=
False
BASE_URL
=
"testing.gargantext.org"
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"
,
"graph.graph"
,
"moissonneurs.pubmed"
,
"moissonneurs.istex"
,
"gargantext.util.ngramlists_tools"
,
)
# garg's custom unittests runner (adapted to our db models)
TEST_RUNNER
=
'unittests.framework.GargTestRunner'
# Application definition
INSTALLED_APPS
=
[
'django.contrib.admin'
,
'django.contrib.auth'
,
'django.contrib.contenttypes'
,
'django.contrib.sessions'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'rest_framework'
,
'djcelery'
,
'annotations'
,
'graph'
,
'moissonneurs'
,
'gargantext'
,
]
MIDDLEWARE_CLASSES
=
[
'django.middleware.security.SecurityMiddleware'
,
'django.contrib.sessions.middleware.SessionMiddleware'
,
'django.middleware.common.CommonMiddleware'
,
'django.middleware.csrf.CsrfViewMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'django.contrib.auth.middleware.SessionAuthenticationMiddleware'
,
'django.contrib.messages.middleware.MessageMiddleware'
,
'django.middleware.clickjacking.XFrameOptionsMiddleware'
,
]
ROOT_URLCONF
=
'gargantext.urls'
TEMPLATES
=
[
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'DIRS'
:
[
os
.
path
.
join
(
BASE_DIR
,
'templates'
),
#'./templates'
],
'APP_DIRS'
:
True
,
'OPTIONS'
:
{
'context_processors'
:
[
'django.template.context_processors.debug'
,
'django.template.context_processors.request'
,
'django.contrib.auth.context_processors.auth'
,
'django.contrib.messages.context_processors.messages'
,
],
},
},
]
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
=
'/srv/gargantext_static/'
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
(
os
.
path
.
join
(
BASE_DIR
,
'static'
),
)
STATICFILES_FINDERS
=
(
'django.contrib.staticfiles.finders.AppDirectoriesFinder'
,
'django.contrib.staticfiles.finders.FileSystemFinder'
,
)
MEDIA_ROOT
=
'/srv/gargantext_media'
#MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
MEDIA_URL
=
'/media/'
# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.postgresql_psycopg2'
,
'NAME'
:
'gargandb'
,
'USER'
:
'gargantua'
,
'PASSWORD'
:
'C8kdcUrAQy66U'
,
'HOST'
:
'127.0.0.1'
,
'PORT'
:
'5432'
,
'TEST'
:
{
'NAME'
:
'test_gargandb'
,
},
}
}
DATABASES
[
'default'
][
'SECRET_URL'
]
=
\
'postgresql+psycopg2://{USER}:{PASSWORD}@{HOST}:{PORT}/{NAME}'
.
format
(
**
DATABASES
[
'default'
]
)
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS
=
[
{
'NAME'
:
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.MinimumLengthValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.CommonPasswordValidator'
,
},
{
'NAME'
:
'django.contrib.auth.password_validation.NumericPasswordValidator'
,
},
]
API_TOKENS
=
{
"CERN"
:
{
"APIKEY"
:
''
,
"APISECRET"
:
''
,
},
"MULTIVAC"
:
{
"APIKEY"
:
""
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
LANGUAGE_CODE
=
'en-us'
TIME_ZONE
=
None
USE_I18N
=
True
USE_L10N
=
True
USE_TZ
=
True
# BOOL Interpreter
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