Graphs and tables for your Spotify account.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
3.3 KiB

  1. """
  2. Django settings for musicdata project.
  3. Generated by 'django-admin startproject' using Django 2.0.5.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/2.0/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/2.0/ref/settings/
  8. """
  9. import os
  10. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  11. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = 'm(gh1&063)haj#^t+h-qh@o6#%w=ruqi_#=6yzi=#@q6#0p*gv'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. ALLOWED_HOSTS = []
  19. # Application definition
  20. INSTALLED_APPS = [
  21. 'django.contrib.admin',
  22. 'django.contrib.auth',
  23. 'django.contrib.contenttypes',
  24. 'django.contrib.sessions',
  25. 'django.contrib.messages',
  26. 'django.contrib.staticfiles',
  27. 'login.apps.LoginConfig',
  28. 'api.apps.ApiConfig',
  29. 'graphs.apps.GraphsConfig',
  30. 'django_tables2',
  31. 'django_filters',
  32. ]
  33. MIDDLEWARE = [
  34. 'django.middleware.security.SecurityMiddleware',
  35. 'django.contrib.sessions.middleware.SessionMiddleware',
  36. 'django.middleware.common.CommonMiddleware',
  37. 'django.middleware.csrf.CsrfViewMiddleware',
  38. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  39. 'django.contrib.messages.middleware.MessageMiddleware',
  40. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  41. ]
  42. ROOT_URLCONF = 'spotifyvis.urls'
  43. TEMPLATES = [
  44. {
  45. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  46. 'DIRS': [],
  47. 'APP_DIRS': True,
  48. 'OPTIONS': {
  49. 'context_processors': [
  50. 'django.template.context_processors.debug',
  51. 'django.template.context_processors.request',
  52. 'django.contrib.auth.context_processors.auth',
  53. 'django.contrib.messages.context_processors.messages',
  54. ],
  55. },
  56. },
  57. ]
  58. WSGI_APPLICATION = 'spotifyvis.wsgi.application'
  59. # Database
  60. # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
  61. DATABASES = {
  62. 'default': {
  63. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  64. 'NAME': 'spotifyvis',
  65. 'USER': 'django',
  66. 'PASSWORD': 'django',
  67. 'HOST': 'localhost',
  68. 'PORT': '',
  69. }
  70. }
  71. # Password validation
  72. # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
  73. AUTH_PASSWORD_VALIDATORS = [
  74. {
  75. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  76. },
  77. {
  78. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  79. },
  80. {
  81. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  82. },
  83. {
  84. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  85. },
  86. ]
  87. # Internationalization
  88. # https://docs.djangoproject.com/en/2.0/topics/i18n/
  89. LANGUAGE_CODE = 'en-us'
  90. TIME_ZONE = 'America/Toronto'
  91. USE_I18N = True
  92. USE_L10N = True
  93. USE_TZ = True
  94. # Static files (CSS, JavaScript, Images)
  95. # https://docs.djangoproject.com/en/2.0/howto/static-files/
  96. STATIC_URL = '/static/'
  97. STATICFILES_DIRS = [
  98. os.path.join(BASE_DIR, "static"),
  99. ]