Peer-to-peer WebRTC connection with minimal setup. https://apps.aweirdimagination.net/camera/
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.
 
 
 
 

96 lines
2.3 KiB

  1. """
  2. Django settings for camera_site project.
  3. Generated by 'django-admin startproject' using Django 3.0.4.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/3.0/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/3.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/3.0/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = 'xh9dx24&9r8yx!@@qyjn@b7z%b-_mc&@itrv&52z#8@=08sdlr'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = False
  18. ALLOWED_HOSTS = []
  19. # Application definition
  20. INSTALLED_APPS = [
  21. 'channels',
  22. 'camera',
  23. 'django.contrib.contenttypes',
  24. 'django.contrib.staticfiles',
  25. ]
  26. MIDDLEWARE = [
  27. 'django.middleware.security.SecurityMiddleware',
  28. 'django.middleware.common.CommonMiddleware',
  29. 'django.middleware.csrf.CsrfViewMiddleware',
  30. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  31. ]
  32. ROOT_URLCONF = 'camera_site.urls'
  33. TEMPLATES = [
  34. {
  35. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  36. 'DIRS': [],
  37. 'APP_DIRS': True,
  38. 'OPTIONS': {
  39. 'context_processors': [
  40. 'django.template.context_processors.debug',
  41. 'django.template.context_processors.request',
  42. ],
  43. },
  44. },
  45. ]
  46. WSGI_APPLICATION = 'camera_site.wsgi.application'
  47. # Internationalization
  48. # https://docs.djangoproject.com/en/3.0/topics/i18n/
  49. LANGUAGE_CODE = 'en-us'
  50. TIME_ZONE = 'UTC'
  51. USE_I18N = True
  52. USE_L10N = True
  53. USE_TZ = True
  54. # Static files (CSS, JavaScript, Images)
  55. # https://docs.djangoproject.com/en/3.0/howto/static-files/
  56. STATIC_URL = '/camera/static/'
  57. ASGI_APPLICATION = 'camera_site.routing.application'
  58. CHANNEL_LAYERS = {
  59. 'default': {
  60. 'BACKEND': 'channels_redis.core.RedisChannelLayer',
  61. 'CONFIG': {
  62. "hosts": [('127.0.0.1', 6379)],
  63. },
  64. },
  65. }
  66. # https://docs.djangoproject.com/en/3.0/ref/settings/#secure-proxy-ssl-header
  67. SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')