def get_installed_apps():
if django.VERSION >= (<NUM_LIT:1>, <NUM_LIT:7>):<EOL><INDENT>from django.apps import apps<EOL>return [a.models_module for a in apps.get_app_configs()<EOL>if a.models_module is not None]<EOL><DEDENT>else:<EOL><INDENT>from django.db import models<EOL>return models.get_apps()<EOL><DEDENT>
Return list of all installed apps