prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Use Bower for JS, CSS dependencies
  We need something to manage our JavaScript (and perhaps CSS) dependencies and this tool is called [Bower](http://bower.io).
  
  @wking [wrote](https://github.com/swcarpentry/amy/pull/239#issuecomment-89585714) some handy instructions on getting Bower up and running.
  
  Bower packages we'd use for now:
  - `bootstrap`
  - `bootstrap-datepicker`
  
  (This should land after #239)
  
  
  </issue>
  <code>
  [start of amy/settings.py]
  1 """
  2 Django settings for amy project.
  3 
  4 For more information on this file, see
  5 https://docs.djangoproject.com/en/1.7/topics/settings/
  6 
  7 For the full list of settings and their values, see
  8 https://docs.djangoproject.com/en/1.7/ref/settings/
  9 """
  10 
  11 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  12 import os
  13 import json
  14 
  15 from django.conf import global_settings
  16 
  17 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  18 
  19 
  20 # Quick-start development settings - unsuitable for production
  21 # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
  22 
  23 
  24 # SECURITY WARNING: don't run with DEBUG turned on in production!
  25 DEBUG = json.loads(os.environ.get('AMY_DEBUG', 'true'))
  26 # For deployment in production:
  27 # AMY_DEBUG=false AMY_SECRET_KEY="..." ./manage.py runserver ...
  28 
  29 if DEBUG:
  30     SECRET_KEY = '3l$35+@a%g!(^y^98oi%ei+%+yvtl3y0k^_7-fmx2oj09-ac5@'
  31 else:
  32     SECRET_KEY = None
  33 SECRET_KEY = os.environ.get('AMY_SECRET_KEY', SECRET_KEY)
  34 
  35 
  36 TEMPLATE_DEBUG = True
  37 
  38 ALLOWED_HOSTS = [
  39     'software-carpentry.org',
  40     'software-carpentry.org.'
  41 ]
  42 
  43 
  44 # Application definition
  45 
  46 INSTALLED_APPS = (
  47     'django.contrib.auth',
  48     'django.contrib.contenttypes',
  49     'django.contrib.sessions',
  50     'django.contrib.messages',
  51     'django.contrib.staticfiles',
  52     'workshops',
  53     # this should be after 'workshops' because templates in
  54     # 'templates/registration/' clash
  55     'django.contrib.admin',
  56     'crispy_forms',
  57 )
  58 
  59 CRISPY_TEMPLATE_PACK = 'bootstrap3'
  60 
  61 MIDDLEWARE_CLASSES = (
  62     'django.contrib.sessions.middleware.SessionMiddleware',
  63     'django.middleware.common.CommonMiddleware',
  64     'django.middleware.csrf.CsrfViewMiddleware',
  65     'django.contrib.auth.middleware.AuthenticationMiddleware',
  66     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  67     'django.contrib.messages.middleware.MessageMiddleware',
  68     'django.middleware.clickjacking.XFrameOptionsMiddleware',
  69 )
  70 
  71 # WARNING: in Django 1.8 processors get moved from ``django.core`` to
  72 #          ``django.template``.
  73 TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
  74     "django.core.context_processors.request",
  75 )
  76 
  77 ROOT_URLCONF = 'amy.urls'
  78 
  79 WSGI_APPLICATION = 'amy.wsgi.application'
  80 
  81 from django.contrib.messages import constants as message_constants
  82 MESSAGE_TAGS = {
  83     message_constants.INFO: 'alert-info',
  84     message_constants.SUCCESS: 'alert-success',
  85     message_constants.WARNING: 'alert-warning',
  86     message_constants.ERROR: 'alert-danger',
  87 }
  88 
  89 
  90 # Database
  91 # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
  92 
  93 DATABASES = {
  94     'default': {
  95         'ENGINE': 'django.db.backends.sqlite3',
  96         'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  97     }
  98 }
  99 
  100 # Authentication
  101 
  102 AUTH_USER_MODEL = 'workshops.Person'
  103 
  104 # Internationalization
  105 # https://docs.djangoproject.com/en/1.7/topics/i18n/
  106 
  107 LANGUAGE_CODE = 'en-us'
  108 
  109 TIME_ZONE = 'EST'
  110 
  111 USE_I18N = True
  112 
  113 USE_L10N = True
  114 
  115 USE_TZ = True
  116 
  117 
  118 # Static files (CSS, JavaScript, Images)
  119 # https://docs.djangoproject.com/en/1.7/howto/static-files/
  120 
  121 STATIC_URL = '/static/'
  122 
  123 # Warn viewers of invalid template strings
  124 TEMPLATE_STRING_IF_INVALID = 'XXX-unset-variable-XXX'
  125 
  126 # if "next" (or "?next") variable is not set when logging in, redirect to
  127 # workshops
  128 LOGIN_REDIRECT_URL = '/workshops/'
  129 
  130 # here's where @login_required redirects to:
  131 LOGIN_URL = '/account/login/'
  132
  [end of amy/settings.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/amy/settings.py b/amy/settings.py
  --- a/amy/settings.py
  +++ b/amy/settings.py
  @@ -119,6 +119,10 @@
   # https://docs.djangoproject.com/en/1.7/howto/static-files/
   
   STATIC_URL = '/static/'
  +STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  +STATICFILES_DIRS = (
  +    os.path.join(BASE_DIR, 'bower_components'),
  +)
   
   # Warn viewers of invalid template strings
   TEMPLATE_STRING_IF_INVALID = 'XXX-unset-variable-XXX'
  
verification_info: {"golden_diff": "diff --git a/amy/settings.py b/amy/settings.py\n--- a/amy/settings.py\n+++ b/amy/settings.py\n@@ -119,6 +119,10 @@\n # https://docs.djangoproject.com/en/1.7/howto/static-files/\n \n STATIC_URL = '/static/'\n+STATIC_ROOT = os.path.join(BASE_DIR, 'static')\n+STATICFILES_DIRS = (\n+    os.path.join(BASE_DIR, 'bower_components'),\n+)\n \n # Warn viewers of invalid template strings\n TEMPLATE_STRING_IF_INVALID = 'XXX-unset-variable-XXX'\n", "issue": "Use Bower for JS, CSS dependencies\nWe need something to manage our JavaScript (and perhaps CSS) dependencies and this tool is called [Bower](http://bower.io).\n\n@wking [wrote](https://github.com/swcarpentry/amy/pull/239#issuecomment-89585714) some handy instructions on getting Bower up and running.\n\nBower packages we'd use for now:\n- `bootstrap`\n- `bootstrap-datepicker`\n\n(This should land after #239)\n\n", "before_files": [{"content": "\"\"\"\nDjango settings for amy project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.7/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.7/ref/settings/\n\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\nimport json\n\nfrom django.conf import global_settings\n\nBASE_DIR = os.path.dirname(os.path.dirname(__file__))\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/\n\n\n# SECURITY WARNING: don't run with DEBUG turned on in production!\nDEBUG = json.loads(os.environ.get('AMY_DEBUG', 'true'))\n# For deployment in production:\n# AMY_DEBUG=false AMY_SECRET_KEY=\"...\" ./manage.py runserver ...\n\nif DEBUG:\n    SECRET_KEY = '3l$35+@a%g!(^y^98oi%ei+%+yvtl3y0k^_7-fmx2oj09-ac5@'\nelse:\n    SECRET_KEY = None\nSECRET_KEY = os.environ.get('AMY_SECRET_KEY', SECRET_KEY)\n\n\nTEMPLATE_DEBUG = True\n\nALLOWED_HOSTS = [\n    'software-carpentry.org',\n    'software-carpentry.org.'\n]\n\n\n# Application definition\n\nINSTALLED_APPS = (\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'workshops',\n    # this should be after 'workshops' because templates in\n    # 'templates/registration/' clash\n    'django.contrib.admin',\n    'crispy_forms',\n)\n\nCRISPY_TEMPLATE_PACK = 'bootstrap3'\n\nMIDDLEWARE_CLASSES = (\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n)\n\n# WARNING: in Django 1.8 processors get moved from ``django.core`` to\n#          ``django.template``.\nTEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (\n    \"django.core.context_processors.request\",\n)\n\nROOT_URLCONF = 'amy.urls'\n\nWSGI_APPLICATION = 'amy.wsgi.application'\n\nfrom django.contrib.messages import constants as message_constants\nMESSAGE_TAGS = {\n    message_constants.INFO: 'alert-info',\n    message_constants.SUCCESS: 'alert-success',\n    message_constants.WARNING: 'alert-warning',\n    message_constants.ERROR: 'alert-danger',\n}\n\n\n# Database\n# https://docs.djangoproject.com/en/1.7/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n    }\n}\n\n# Authentication\n\nAUTH_USER_MODEL = 'workshops.Person'\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.7/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'EST'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.7/howto/static-files/\n\nSTATIC_URL = '/static/'\n\n# Warn viewers of invalid template strings\nTEMPLATE_STRING_IF_INVALID = 'XXX-unset-variable-XXX'\n\n# if \"next\" (or \"?next\") variable is not set when logging in, redirect to\n# workshops\nLOGIN_REDIRECT_URL = '/workshops/'\n\n# here's where @login_required redirects to:\nLOGIN_URL = '/account/login/'\n", "path": "amy/settings.py"}]}