123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- import os
- import spacy
- import en_core_web_md
- # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
- BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- # SECURITY WARNING: keep the secret key used in production secret!
- SECRET_KEY = '0t@j@klm8b@2rdl@po$$24pirh$&cg#p6f#)@$@n8^kn7k2%9b'
- # SECURITY WARNING: don't run with debug turned on in production!
- DEBUG = True
- ALLOWED_HOSTS = ['10.0.0.17', '127.0.0.1']
- # Application definition
- INSTALLED_APPS = [
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'gauth.apps.GauthConfig',
- 'review.apps.ReviewConfig',
- 'dashboard.apps.DashboardConfig',
- 'nlu_job.apps.NluJobConfig',
- 'analytics.apps.AnalyticsConfig',
- 'name_extractor.apps.NameExtractorConfig',
- 'crispy_forms',
- 'django_crontab',
- ]
- MIDDLEWARE = [
- 'django.middleware.security.SecurityMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
- ]
- ROOT_URLCONF = 'review_automation.urls'
- TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
- '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 = 'review_automation.wsgi.application'
- # Database
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.mysql',
- 'NAME': 'review_automation',
- 'USER': 'root',
- 'PASSWORD': 'sad2002S1',
- 'HOST': '10.0.0.17',
- 'PORT': '3306',
- }
- }
- # Password validation
- 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',
- },
- ]
- # Internationalization
- LANGUAGE_CODE = 'en-us'
- TIME_ZONE = 'UTC'
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- # Static files (CSS, JavaScript, Images)
- STATIC_URL = '/static/'
- LOGIN_URL = '/admin/login'
- LOGIN_REDIRECT_URL = '/'
- CRISPY_TEMPLATE_PACK = 'bootstrap4'
- # Google credentials
- CLIENT_ID = "174657415928-0bt50gt42pslq47gf21ao67n15rom96r.apps.googleusercontent.com"
- CLIENT_SECRET = "ZXYpt07Su0pW3y3jPGOXY_C_"
- TOKEN_URI = "https://oauth2.googleapis.com/token"
- HOST_URI = "http://127.0.0.1:8000"
- NLU_SERVER_URI = 'http://10.0.0.33:5005'
- # Cron-Jobs of the project
- CRONJOBS = [
- ('0 6 * * *', 'review.background_job.background_task'),
- ]
- # spaCy model
- # MODEL = spacy.load('en_core_web_md')
- MODEL = 'NLP NER MODEL'
|