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.
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia