#C256. Django Settings Loader

    ID: 45889 Type: Default 1000ms 256MiB

Django Settings Loader

Django Settings Loader

In this problem, you are required to output a JSON-formatted configuration for a Django project’s settings. The configuration must contain various keys required for setting up a basic Django project. These include keys such as (BASE_DIR), (SECRET_KEY), (DEBUG), (ALLOWED_HOSTS), (INSTALLED_APPS), (MIDDLEWARE), (DATABASES), (LANGUAGE_CODE), (TIME_ZONE), and so on. The values must exactly match the ones described below. For instance, (SECRET_KEY) should be 'django-insecure-default-secret-key', and the database engine should be 'django.db.backends.postgresql'.

Note that there is no input from STDIN. Your program should simply print the JSON configuration (as a one-line string) to STDOUT. Ensure that boolean literals and JSON formatting adhere strictly to the JSON standard.

inputFormat

This problem does not take any input from STDIN. You should ignore any input and simply output the required JSON configuration.

outputFormat

Print to STDOUT a single JSON string that represents the Django settings configuration. The output must be exactly as specified, with the following keys and values:

(BASE_DIR): "project_base_directory" (SECRET_KEY): "django-insecure-default-secret-key" (DEBUG): true (ALLOWED_HOSTS): [] (INSTALLED_APPS): ["django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles"] (MIDDLEWARE): ["django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XContentOptionsMiddleware"] (DATABASES): { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "your_database_name", "USER": "your_database_user", "PASSWORD": "your_database_password", "HOST": "localhost", "PORT": "5432" } } (LANGUAGE_CODE): "en-us" (TIME_ZONE): "UTC" (USE_I18N): true (USE_L10N): true (USE_TZ): true (STATIC_URL): "/static/" (MEDIA_URL): "/media/" (TEMPLATE_DIR): "project_templates_directory" (TEMPLATES): [ { "BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": ["project_templates_directory"], "APP_DIRS": true, "OPTIONS": { "context_processors": ["django.template.context_processors.debug", "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages"] } } ] (WSGI_APPLICATION): "your_project_name.wsgi.application"

The output must be a minified JSON string (i.e. without extra spaces or line breaks).## sample

{"BASE_DIR":"project_base_directory","SECRET_KEY":"django-insecure-*default-secret-key*","DEBUG":true,"ALLOWED_HOSTS":[],"INSTALLED_APPS":["django.contrib.admin","django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.messages","django.contrib.staticfiles"],"MIDDLEWARE":["django.middleware.security.SecurityMiddleware","django.contrib.sessions.middleware.SessionMiddleware","django.middleware.common.CommonMiddleware","django.middleware.csrf.CsrfViewMiddleware","django.contrib.auth.middleware.AuthenticationMiddleware","django.contrib.messages.middleware.MessageMiddleware","django.middleware.clickjacking.XContentOptionsMiddleware"],"DATABASES":{"default":{"ENGINE":"django.db.backends.postgresql","NAME":"your_database_name","USER":"your_database_user","PASSWORD":"your_database_password","HOST":"localhost","PORT":"5432"}},"LANGUAGE_CODE":"en-us","TIME_ZONE":"UTC","USE_I18N":true,"USE_L10N":true,"USE_TZ":true,"STATIC_URL":"/static/","MEDIA_URL":"/media/","TEMPLATE_DIR":"project_templates_directory","TEMPLATES":[{"BACKEND":"django.template.backends.django.DjangoTemplates","DIRS":["project_templates_directory"],"APP_DIRS":true,"OPTIONS":{"context_processors":["django.template.context_processors.debug","django.template.context_processors.request","django.contrib.auth.context_processors.auth","django.contrib.messages.context_processors.messages"]}}],"WSGI_APPLICATION":"your_project_name.wsgi.application"}