input: Write a function to create a Django application with a model that stores the name, address, and email of a user. The function should execute the necessary commands to start the Django project, create the model, and perform the required migrations. If the creation and migration are successful, return True; otherwise, return False.
  assert create_django_app() == True
output: 
  def create_django_app():
      import os
      import subprocess
  
      # Create the Django project
      project_name = "myproject"
      app_name = "myapp"
      model_code = '''
  from django.db import models
  
  class UserProfile(models.Model):
      name = models.CharField(max_length=100)
      address = models.CharField(max_length=200)
      email = models.EmailField()
      '''
  
      try:
          # Create the Django project
          subprocess.run(["django-admin", "startproject", project_name], check=True)
          os.chdir(project_name)
  
          # Create the Django app
          subprocess.run(["python", "manage.py", "startapp", app_name], check=True)
  
          # Add the app to INSTALLED_APPS in settings.py
          settings_path = os.path.join(project_name, "settings.py")
          with open(settings_path, "r") as file:
              settings_content = file.read()
          settings_content = settings_content.replace(
              "INSTALLED_APPS = [",
              f"INSTALLED_APPS = [\n    '{app_name}',"
          )
          with open(settings_path, "w") as file:
              file.write(settings_content)
  
          # Create the model in models.py
          models_path = os.path.join(app_name, "models.py")
          with open(models_path, "w") as file:
              file.write(model_code)
  
          # Perform migrations
          subprocess.run(["python", "manage.py", "makemigrations"], check=True)
          subprocess.run(["python", "manage.py", "migrate"], check=True)
  
          return True
      except subprocess.CalledProcessError:
          return False
  