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