Skip to main content

django-configurations AWS EC2 settings - ALLOWED_HOSTS and LOGGING

Project description

Installation

$ [sudo] pip install django-configurations-ec2

Features

  • ALLOWED_HOSTS - EC2 private ip
  • LOGGING - CloudWatch logging
settings.py
from configurations import Configuration
from django_configurations_ec2 import AllowedHostsMixin, LoggingMixin

class Prod(AllowedHostsMixin,Configuration):
    ALLOWED_HOSTS=['.domain.com']

CloudWatch

from configurations import Configuration
from django_configurations_ec2 import LoggingMixin

class Prod(LoggingMixin,Configuration):
    ...
.env
DJANGO_AWS_ACCESS_KEY_ID=ACCESS_KEY_ID
DJANGO_AWS_SECRET_ACCESS_KEY=SECRET_ACCESS_KEY
DJANGO_AWS_REGION_NAME=REGION_NAME
DJANGO_AWS_LOG_GROUP=LOG_GROUP
DJANGO_AWS_STREAM_NAME=STREAM_NAME

Links

readme42.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-configurations-ec2-2020.10.25.tar.gz (2.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page