old_contents: 
  def pytest_configure(config):
      from django.conf import settings
      if not settings.configured:
          settings.configure(
              DATABASE_ENGINE='sqlite3',
              DATABASES={
                  'default': {
                      'NAME': ':memory:',
                      'ENGINE': 'django.db.backends.sqlite3',
                      'TEST_NAME': ':memory:',
                  },
              },
              DATABASE_NAME=':memory:',
              TEST_DATABASE_NAME=':memory:',
              INSTALLED_APPS=[
                  'django.contrib.admin',
                  'django.contrib.auth',
                  'django.contrib.contenttypes',
                  'django.contrib.sessions',
                  'django.contrib.messages',
                  'django.contrib.staticfiles',
  
                  # Project's apps
  
                  # 3rd parties
              ],
              ROOT_URLCONF='{{cookiecutter.repo_name}}.urls',
              DEBUG=False,
              SITE_ID=1,
              TEMPLATE_DEBUG=True,
              ALLOWED_HOSTS=['*'],
              LOGGING={
                  'version': 1,
                  'disable_existing_loggers': False,
                  'formatters': {
                      'standard': {
                          'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
                      },
                  },
                  'handlers': {
                      'default': {
                          'level': 'DEBUG',
                          'class': 'logging.StreamHandler',
                      },
                  },
                  'loggers': {
                      '': {
                          'handlers': ['default'],
                          'level': 'DEBUG',
                          'propagate': True
                      },
                  },
              },
          )
  
new_contents: import os.path
  from copy import copy
  
  
  BASE_DIR = os.path.dirname(os.path.abspath(__file__))
  
  
  def pytest_configure(config):
      from django.conf import settings
      if not settings.configured:
          from {{cookiecutter.project_name}} import settings as {{cookiecutter.project_name}}_settings
          default = copy({{cookiecutter.project_name}}_settings.__dict__)
          default.update({
              'DATABASE_ENGINE': 'sqlite3',
              'DATABASES': {
                  'default': {
                      'NAME': ':memory:',
                      'ENGINE': 'django.db.backends.sqlite3',
                      'TEST_NAME': ':memory:',
                  },
              },
              'DATABASE_NAME': ':memory:',
              'TEST_DATABASE_NAME': ':memory:',
          },)
          settings.configure(**default)
  
subject: use settings in conftest