input: Write a Python function to create a new Django project and app, configure it, and add a simple Post model. Include necessary migrations and assert that the Post model has been created correctly.
  ```python
  import os
  import django
  from django.conf import settings
  from django.db import models
  
  def setup_django_project():
      # Create the project and app
      os.system('django-admin startproject blog')
      os.chdir('blog')
      os.system('python manage.py startapp posts')
      
      # Configure settings
      settings.configure(
          INSTALLED_APPS=[
              'django.contrib.contenttypes',
              'django.contrib.auth',
              'django.contrib.sessions',
              'django.contrib.admin',
              'posts',
          ],
          DATABASES={
              'default': {
                  'ENGINE': 'django.db.backends.sqlite3',
                  'NAME': 'mydatabase',
              }
          }
      )
      
      # Setup Django
      django.setup()
      
      # Create the models
      class Post(models.Model):
          title = models.CharField(max_length=200)
          body = models.TextField()
      
      # Perform migrations
      os.system('python manage.py makemigrations posts')
      os.system('python manage.py migrate')
      
      return Post
  
  Post = setup_django_project()
  assert hasattr(Post, 'title')
  assert hasattr(Post, 'body')
  print("Post model created successfully with 'title' and 'body' fields.")
output: # Add the Post model to the app's models
      with open('posts/models.py', 'w') as f:
          f.write("""
  from django.db import models
  
  class Post(models.Model):
      title = models.CharField(max_length=200)
      body = models.TextField()
  """)
      
      # Perform migrations
      os.system('python manage.py makemigrations posts')
      os.system('python manage.py migrate')
  
      # Reload the models after migration
      from posts.models import Post
      
      return Post
  
  Post = setup_django_project()
  assert hasattr(Post, 'title')
  assert hasattr(Post, 'body')
  print("Post model created successfully with 'title' and 'body' fields.")