Build_dict_language
get_dict_language
Function that transforms the tuple of the settings variable LANGUAGES into an object.
def get_dict_language():
language = {lang[0]: lang[1] for lang in settings.LANGUAGES}
return language
get_dict_language
Function that returns an array with the codes of the languages of the varaible settings LANGUAGES.
def get_array_language():
language = [lang[0] for lang in settings.LANGUAGES]
return language
get_dict_countries
Function that returns an object with the codes and countries of the django_countries module.
def get_dict_countries():
dict_countries = {country.code: country.name for country in countries}
return dict_countries