Each Django project has its configuration set in the settings.py settings file, or in config/base.py as described in the recipe Configuring settings for development, testing, staging, and production environments in Chapter 1, Getting Started with Django 2.0. Some of these configuration values may well be useful for functionality in the browser, and so they will also need to be set in JavaScript. As we want a single location to define our project settings and we don't want to repeat the process when setting the configuration for the JavaScript values, it is good practice to include a dynamically generated configuration file in the base template. In this recipe, we will see how to do that.
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine