django.conf settings Example Code

The Django settings file contains all of the configuration for a web application.

Example 1 from django-easy-timezones

django-easy-timezones (project website) is a Django middleware code library to simplify handling time data in your applications using users' geolocation data.

This example shows how to import the configuration from your Django settings.py file into a different part of your web application.

django-easy-timezones/easy_timezones/middleware.py

Example 2 from django-filer

django-filer (project documentation) is a file management library for uploading and organizing files and images in Django's admin interface. The project's code is available under the BSD 3-Clause "New" or "Revised" open source license.

This example code file shows how to set many parts of the configuration within a setttings.py file.

django-filer / filer / settings.py

Example 3 from django-cors-headers

django-cors-headers is an open source library for enabling Cross-Origin Resource Sharing (CORS) handling in your Django web applications and appropriately dealing with HTTP headers for CORS requests.

django-cors-headers / src / corsheaders / conf.py