Complete the code to add a new app named 'blog' to the installed apps list.
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
[1]
]In Django settings, apps are listed as strings with commas. Adding 'blog', (with comma) correctly adds the app.
Complete the code to import the settings module in a Django project.
from django.conf import [1]
The Django settings module is imported from django.conf as 'settings'.
Fix the error in the code to check if 'blog' app is installed.
if 'blog' [1] settings.INSTALLED_APPS: print('Blog app is installed')
To check if an app is installed, use the 'in' keyword to see if it is in INSTALLED_APPS list.
Fill both blanks to add 'blog' app config class to INSTALLED_APPS.
INSTALLED_APPS.append([1]) print([2][-1])
To add the app config class, append its string to INSTALLED_APPS list and print the last item from INSTALLED_APPS.
Fill all three blanks to create a dictionary of app names and their config classes from INSTALLED_APPS.
app_dict = [1]( (app.split('.')[-1].replace('Config', '').lower(), app) for app in [2] if app.endswith([3]) )
This code builds a dictionary from INSTALLED_APPS filtering apps ending with 'Config'.