prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add shell pluss and django extensions
  
  
  </issue>
  <code>
  [start of lego/settings/base.py]
  1 import sys
  2 import os
  3 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  4 
  5 SECRET_KEY = 'This is supersecret'
  6 
  7 TESTING = 'test' in sys.argv  # Check if manage.py test has been run
  8 
  9 DEBUG = True
  10 TEMPLATE_DEBUG = True
  11 ALLOWED_HOSTS = []
  12 
  13 AUTH_USER_MODEL = 'users.User'
  14 
  15 INSTALLED_APPS = (
  16     'django.contrib.admin',
  17     'django.contrib.auth',
  18     'django.contrib.contenttypes',
  19     'django.contrib.sessions',
  20     'django.contrib.messages',
  21     'django.contrib.staticfiles',
  22 
  23     'oauth2_provider',
  24     'rest_framework',
  25 
  26     'lego.apps.LegoConfig',
  27     'lego.users',
  28 
  29     'lego.app.oauth',
  30 )
  31 
  32 AUTHENTICATION_BACKEND = (
  33     'oauth2_provider.backends.OAuth2Backend'
  34 )
  35 
  36 MIDDLEWARE_CLASSES = (
  37     'django.contrib.sessions.middleware.SessionMiddleware',
  38     'django.middleware.common.CommonMiddleware',
  39     'django.middleware.csrf.CsrfViewMiddleware',
  40     'oauth2_provider.middleware.OAuth2TokenMiddleware',
  41     'django.contrib.auth.middleware.AuthenticationMiddleware',
  42     'django.contrib.messages.middleware.MessageMiddleware',
  43     'django.middleware.clickjacking.XFrameOptionsMiddleware',
  44 )
  45 
  46 OAUTH2_PROVIDER_APPLICATION_MODEL = 'oauth.APIApplication'
  47 
  48 ROOT_URLCONF = 'lego.urls'
  49 
  50 WSGI_APPLICATION = 'lego.wsgi.application'
  51 
  52 LANGUAGE_CODE = 'en-us'
  53 TIME_ZONE = 'UTC'
  54 USE_I18N = True
  55 USE_L10N = True
  56 USE_TZ = True
  57 DEBUG = True
  58 
  59 STATIC_URL = '/static/'
  60 STATIC_ROOT = os.path.join(BASE_DIR, '../static')
  61 MEDIA_URL = '/uploads/'
  62 MEDIA_ROOT = os.path.join(BASE_DIR, '../uploads')
  63 
  64 TEMPLATE_DIRS = (
  65     os.path.join(BASE_DIR, 'templates'),
  66 )
  67
  [end of lego/settings/base.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/lego/settings/base.py b/lego/settings/base.py
  --- a/lego/settings/base.py
  +++ b/lego/settings/base.py
  @@ -6,6 +6,8 @@
   
   TESTING = 'test' in sys.argv  # Check if manage.py test has been run
   
  +SHELL_PLUS = "ipython"
  +
   DEBUG = True
   TEMPLATE_DEBUG = True
   ALLOWED_HOSTS = []
  @@ -20,6 +22,8 @@
       'django.contrib.messages',
       'django.contrib.staticfiles',
   
  +    'django_extensions',
  +
       'oauth2_provider',
       'rest_framework',
  
verification_info: {"golden_diff": "diff --git a/lego/settings/base.py b/lego/settings/base.py\n--- a/lego/settings/base.py\n+++ b/lego/settings/base.py\n@@ -6,6 +6,8 @@\n \n TESTING = 'test' in sys.argv  # Check if manage.py test has been run\n \n+SHELL_PLUS = \"ipython\"\n+\n DEBUG = True\n TEMPLATE_DEBUG = True\n ALLOWED_HOSTS = []\n@@ -20,6 +22,8 @@\n     'django.contrib.messages',\n     'django.contrib.staticfiles',\n \n+    'django_extensions',\n+\n     'oauth2_provider',\n     'rest_framework',\n", "issue": "Add shell pluss and django extensions\n\n", "before_files": [{"content": "import sys\nimport os\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\n\nSECRET_KEY = 'This is supersecret'\n\nTESTING = 'test' in sys.argv  # Check if manage.py test has been run\n\nDEBUG = True\nTEMPLATE_DEBUG = True\nALLOWED_HOSTS = []\n\nAUTH_USER_MODEL = 'users.User'\n\nINSTALLED_APPS = (\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n\n    'oauth2_provider',\n    'rest_framework',\n\n    'lego.apps.LegoConfig',\n    'lego.users',\n\n    'lego.app.oauth',\n)\n\nAUTHENTICATION_BACKEND = (\n    'oauth2_provider.backends.OAuth2Backend'\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'oauth2_provider.middleware.OAuth2TokenMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n)\n\nOAUTH2_PROVIDER_APPLICATION_MODEL = 'oauth.APIApplication'\n\nROOT_URLCONF = 'lego.urls'\n\nWSGI_APPLICATION = 'lego.wsgi.application'\n\nLANGUAGE_CODE = 'en-us'\nTIME_ZONE = 'UTC'\nUSE_I18N = True\nUSE_L10N = True\nUSE_TZ = True\nDEBUG = True\n\nSTATIC_URL = '/static/'\nSTATIC_ROOT = os.path.join(BASE_DIR, '../static')\nMEDIA_URL = '/uploads/'\nMEDIA_ROOT = os.path.join(BASE_DIR, '../uploads')\n\nTEMPLATE_DIRS = (\n    os.path.join(BASE_DIR, 'templates'),\n)\n", "path": "lego/settings/base.py"}]}