prod.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import spacy
  2. from .base import *
  3. try:
  4. SPACY_NER_MODEL = spacy.load('en_core_web_lg')
  5. print('\033[93mSpacy model large size has loaded!\033[0m')
  6. except OSError:
  7. print('\033[93mNo spacy model has found. Please install a large sized spacy model.\033[0m')
  8. # SECURITY WARNING: don't run with debug turned on in production!
  9. DEBUG = False
  10. ALLOWED_HOSTS = ['10.0.0.36', 'bytetrek.com', 'localhost']
  11. WSGI_APPLICATION = 'review_automation.wsgi.prod.application'
  12. # Database
  13. DATABASES = {
  14. 'default': {
  15. 'ENGINE': 'django.db.backends.mysql',
  16. 'NAME': 'bt_review_bot',
  17. 'USER': 'root',
  18. 'PASSWORD': 'sad2002S1',
  19. 'HOST': 'localhost',
  20. 'PORT': '3306',
  21. }
  22. }
  23. # Password validation
  24. AUTH_PASSWORD_VALIDATORS = [
  25. {
  26. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  27. },
  28. {
  29. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  30. },
  31. {
  32. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  33. },
  34. {
  35. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  36. },
  37. ]
  38. # Host URLS
  39. HOST_URI = "http://10.0.0.36:5005"
  40. NLU_SERVER_URI = 'http://localhost:1996'
  41. # selenium-firefox instance
  42. BROWSER = get_firefox_browser()