prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Figure out how timezones should work on roll page
  Times are in UTC. Ben and Adam will be using this from the US. Can we auto-detect the user's timezone? Is this something Django can do for us?
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `will_of_the_prophets/urls.py`
  Content:
  ```
  1 """will_of_the_prophets URL Configuration
  2 
  3 The `urlpatterns` list routes URLs to views. For more information please see:
  4     https://docs.djangoproject.com/en/2.0/topics/http/urls/
  5 Examples:
  6 Function views
  7     1. Add an import:  from my_app import views
  8     2. Add a URL to urlpatterns:  path('', views.home, name='home')
  9 Class-based views
  10     1. Add an import:  from other_app.views import Home
  11     2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
  12 Including another URLconf
  13     1. Import the include() function: from django.urls import include, path
  14     2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
  15 """
  16 from django.contrib import admin
  17 from django.urls import include, path
  18 
  19 
  20 from will_of_the_prophets import views
  21 
  22 urlpatterns = [
  23     path('admin/', admin.site.urls),
  24     path('accounts/', include('django.contrib.auth.urls')),
  25     path('roll/', views.RollView.as_view(), name='roll'),
  26     path('', views.public_board, name='public_board'),
  27 ]
  28
  ```
  
  Path: `will_of_the_prophets/settings/__init__.py`
  Content:
  ```
  1 """
  2 Django settings for will_of_the_prophets project.
  3 
  4 Generated by 'django-admin startproject' using Django 2.0.4.
  5 
  6 For more information on this file, see
  7 https://docs.djangoproject.com/en/2.0/topics/settings/
  8 
  9 For the full list of settings and their values, see
  10 https://docs.djangoproject.com/en/2.0/ref/settings/
  11 """
  12 
  13 import os
  14 
  15 import django_heroku
  16 
  17 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  18 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  19 
  20 
  21 # Quick-start development settings - unsuitable for production
  22 # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
  23 
  24 # SECURITY WARNING: keep the secret key used in production secret!
  25 SECRET_KEY = os.environ.get(
  26     'SECRET_KEY', 'bah!osmx@cpaoulc-!eohvd3ldoy*^oki#l25-v6tvq04=6npz')
  27 
  28 # SECURITY WARNING: don't run with debug turned on in production!
  29 DEBUG = os.environ.get('DEBUG', False)
  30 
  31 ALLOWED_HOSTS = ['*.herokuapp.com', 'localhost']
  32 
  33 
  34 # Application definition
  35 
  36 INSTALLED_APPS = [
  37     'raven.contrib.django.raven_compat',
  38     'django.contrib.admin',
  39     'django.contrib.auth',
  40     'django.contrib.contenttypes',
  41     'django.contrib.sessions',
  42     'django.contrib.messages',
  43     'django.contrib.staticfiles',
  44     'sass_processor',
  45     'widget_tweaks',
  46     'bootstrap',
  47     'will_of_the_prophets',
  48 ]
  49 
  50 MIDDLEWARE = [
  51     'django.middleware.security.SecurityMiddleware',
  52     'django.contrib.sessions.middleware.SessionMiddleware',
  53     'django.middleware.common.CommonMiddleware',
  54     'django.middleware.csrf.CsrfViewMiddleware',
  55     'django.contrib.auth.middleware.AuthenticationMiddleware',
  56     'django.contrib.messages.middleware.MessageMiddleware',
  57     'django.middleware.clickjacking.XFrameOptionsMiddleware',
  58 ]
  59 
  60 ROOT_URLCONF = 'will_of_the_prophets.urls'
  61 
  62 TEMPLATES = [
  63     {
  64         'BACKEND': 'django.template.backends.django.DjangoTemplates',
  65         'DIRS': [],
  66         'APP_DIRS': True,
  67         'OPTIONS': {
  68             'context_processors': [
  69                 'django.template.context_processors.debug',
  70                 'django.template.context_processors.request',
  71                 'django.contrib.auth.context_processors.auth',
  72                 'django.contrib.messages.context_processors.messages',
  73             ],
  74         },
  75     },
  76 ]
  77 
  78 WSGI_APPLICATION = 'will_of_the_prophets.wsgi.application'
  79 
  80 
  81 # Database
  82 # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
  83 
  84 DATABASES = {
  85     'default': {
  86         'ENGINE': 'django.db.backends.sqlite3',
  87         'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  88     }
  89 }
  90 
  91 
  92 # Password validation
  93 # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
  94 
  95 AUTH_PASSWORD_VALIDATORS = [
  96     {
  97         'NAME': ('django.contrib.auth.password_validation'
  98                  '.UserAttributeSimilarityValidator'),
  99     },
  100     {
  101         'NAME': ('django.contrib.auth.password_validation'
  102                  '.MinimumLengthValidator'),
  103     },
  104     {
  105         'NAME': ('django.contrib.auth.password_validation'
  106                  '.CommonPasswordValidator'),
  107     },
  108     {
  109         'NAME': ('django.contrib.auth.password_validation'
  110                  '.NumericPasswordValidator'),
  111     },
  112 ]
  113 
  114 
  115 # Internationalization
  116 # https://docs.djangoproject.com/en/2.0/topics/i18n/
  117 
  118 LANGUAGE_CODE = 'en-us'
  119 
  120 TIME_ZONE = 'UTC'
  121 
  122 USE_I18N = True
  123 
  124 USE_L10N = True
  125 
  126 USE_TZ = True
  127 
  128 
  129 # Static files (CSS, JavaScript, Images)
  130 # https://docs.djangoproject.com/en/2.0/howto/static-files/
  131 
  132 STATIC_URL = '/static/'
  133 
  134 STATICFILES_FINDERS = [
  135     'django.contrib.staticfiles.finders.FileSystemFinder',
  136     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  137     # https://github.com/jrief/django-sass-processor
  138     'sass_processor.finders.CssFinder',
  139 ]
  140 
  141 
  142 # django-sass-processor
  143 # https://github.com/jrief/django-sass-processor
  144 SASS_OUTPUT_STYLE = 'compressed'
  145 
  146 
  147 # Configure Django App for Heroku.
  148 django_heroku.settings(locals())
  149
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/will_of_the_prophets/settings/__init__.py b/will_of_the_prophets/settings/__init__.py
  --- a/will_of_the_prophets/settings/__init__.py
  +++ b/will_of_the_prophets/settings/__init__.py
  @@ -43,6 +43,7 @@
       'django.contrib.staticfiles',
       'sass_processor',
       'widget_tweaks',
  +    'tz_detect',
       'bootstrap',
       'will_of_the_prophets',
   ]
  @@ -144,5 +145,14 @@
   SASS_OUTPUT_STYLE = 'compressed'
   
   
  +# django-tz-detect
  +# https://github.com/adamcharnock/django-tz-detect
  +MIDDLEWARE += [
  +    'tz_detect.middleware.TimezoneMiddleware',
  +]
  +
  +TZ_DETECT_COUNTRIES = ('US', 'CN', 'IN', 'JP', 'BR', 'RU', 'DE', 'FR', 'GB')
  +
  +
   # Configure Django App for Heroku.
   django_heroku.settings(locals())
  diff --git a/will_of_the_prophets/urls.py b/will_of_the_prophets/urls.py
  --- a/will_of_the_prophets/urls.py
  +++ b/will_of_the_prophets/urls.py
  @@ -23,5 +23,6 @@
       path('admin/', admin.site.urls),
       path('accounts/', include('django.contrib.auth.urls')),
       path('roll/', views.RollView.as_view(), name='roll'),
  +    path('tz_detect/', include('tz_detect.urls')),
       path('', views.public_board, name='public_board'),
   ]
  
verification_info: {"golden_diff": "diff --git a/will_of_the_prophets/settings/__init__.py b/will_of_the_prophets/settings/__init__.py\n--- a/will_of_the_prophets/settings/__init__.py\n+++ b/will_of_the_prophets/settings/__init__.py\n@@ -43,6 +43,7 @@\n     'django.contrib.staticfiles',\n     'sass_processor',\n     'widget_tweaks',\n+    'tz_detect',\n     'bootstrap',\n     'will_of_the_prophets',\n ]\n@@ -144,5 +145,14 @@\n SASS_OUTPUT_STYLE = 'compressed'\n \n \n+# django-tz-detect\n+# https://github.com/adamcharnock/django-tz-detect\n+MIDDLEWARE += [\n+    'tz_detect.middleware.TimezoneMiddleware',\n+]\n+\n+TZ_DETECT_COUNTRIES = ('US', 'CN', 'IN', 'JP', 'BR', 'RU', 'DE', 'FR', 'GB')\n+\n+\n # Configure Django App for Heroku.\n django_heroku.settings(locals())\ndiff --git a/will_of_the_prophets/urls.py b/will_of_the_prophets/urls.py\n--- a/will_of_the_prophets/urls.py\n+++ b/will_of_the_prophets/urls.py\n@@ -23,5 +23,6 @@\n     path('admin/', admin.site.urls),\n     path('accounts/', include('django.contrib.auth.urls')),\n     path('roll/', views.RollView.as_view(), name='roll'),\n+    path('tz_detect/', include('tz_detect.urls')),\n     path('', views.public_board, name='public_board'),\n ]\n", "issue": "Figure out how timezones should work on roll page\nTimes are in UTC. Ben and Adam will be using this from the US. Can we auto-detect the user's timezone? Is this something Django can do for us?\n", "before_files": [{"content": "\"\"\"will_of_the_prophets URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n    https://docs.djangoproject.com/en/2.0/topics/http/urls/\nExamples:\nFunction views\n    1. Add an import:  from my_app import views\n    2. Add a URL to urlpatterns:  path('', views.home, name='home')\nClass-based views\n    1. Add an import:  from other_app.views import Home\n    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')\nIncluding another URLconf\n    1. Import the include() function: from django.urls import include, path\n    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))\n\"\"\"\nfrom django.contrib import admin\nfrom django.urls import include, path\n\n\nfrom will_of_the_prophets import views\n\nurlpatterns = [\n    path('admin/', admin.site.urls),\n    path('accounts/', include('django.contrib.auth.urls')),\n    path('roll/', views.RollView.as_view(), name='roll'),\n    path('', views.public_board, name='public_board'),\n]\n", "path": "will_of_the_prophets/urls.py"}, {"content": "\"\"\"\nDjango settings for will_of_the_prophets project.\n\nGenerated by 'django-admin startproject' using Django 2.0.4.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2.0/ref/settings/\n\"\"\"\n\nimport os\n\nimport django_heroku\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = os.environ.get(\n    'SECRET_KEY', 'bah!osmx@cpaoulc-!eohvd3ldoy*^oki#l25-v6tvq04=6npz')\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = os.environ.get('DEBUG', False)\n\nALLOWED_HOSTS = ['*.herokuapp.com', 'localhost']\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    'raven.contrib.django.raven_compat',\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    'sass_processor',\n    'widget_tweaks',\n    'bootstrap',\n    'will_of_the_prophets',\n]\n\nMIDDLEWARE = [\n    'django.middleware.security.SecurityMiddleware',\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.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'will_of_the_prophets.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'will_of_the_prophets.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/2.0/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\n# Password validation\n# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': ('django.contrib.auth.password_validation'\n                 '.UserAttributeSimilarityValidator'),\n    },\n    {\n        'NAME': ('django.contrib.auth.password_validation'\n                 '.MinimumLengthValidator'),\n    },\n    {\n        'NAME': ('django.contrib.auth.password_validation'\n                 '.CommonPasswordValidator'),\n    },\n    {\n        'NAME': ('django.contrib.auth.password_validation'\n                 '.NumericPasswordValidator'),\n    },\n]\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/2.0/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'UTC'\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/2.0/howto/static-files/\n\nSTATIC_URL = '/static/'\n\nSTATICFILES_FINDERS = [\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    # https://github.com/jrief/django-sass-processor\n    'sass_processor.finders.CssFinder',\n]\n\n\n# django-sass-processor\n# https://github.com/jrief/django-sass-processor\nSASS_OUTPUT_STYLE = 'compressed'\n\n\n# Configure Django App for Heroku.\ndjango_heroku.settings(locals())\n", "path": "will_of_the_prophets/settings/__init__.py"}], "after_files": [{"content": "\"\"\"will_of_the_prophets URL Configuration\n\nThe `urlpatterns` list routes URLs to views. For more information please see:\n    https://docs.djangoproject.com/en/2.0/topics/http/urls/\nExamples:\nFunction views\n    1. Add an import:  from my_app import views\n    2. Add a URL to urlpatterns:  path('', views.home, name='home')\nClass-based views\n    1. Add an import:  from other_app.views import Home\n    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')\nIncluding another URLconf\n    1. Import the include() function: from django.urls import include, path\n    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))\n\"\"\"\nfrom django.contrib import admin\nfrom django.urls import include, path\n\n\nfrom will_of_the_prophets import views\n\nurlpatterns = [\n    path('admin/', admin.site.urls),\n    path('accounts/', include('django.contrib.auth.urls')),\n    path('roll/', views.RollView.as_view(), name='roll'),\n    path('tz_detect/', include('tz_detect.urls')),\n    path('', views.public_board, name='public_board'),\n]\n", "path": "will_of_the_prophets/urls.py"}, {"content": "\"\"\"\nDjango settings for will_of_the_prophets project.\n\nGenerated by 'django-admin startproject' using Django 2.0.4.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2.0/ref/settings/\n\"\"\"\n\nimport os\n\nimport django_heroku\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = os.environ.get(\n    'SECRET_KEY', 'bah!osmx@cpaoulc-!eohvd3ldoy*^oki#l25-v6tvq04=6npz')\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = os.environ.get('DEBUG', False)\n\nALLOWED_HOSTS = ['*.herokuapp.com', 'localhost']\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    'raven.contrib.django.raven_compat',\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    'sass_processor',\n    'widget_tweaks',\n    'tz_detect',\n    'bootstrap',\n    'will_of_the_prophets',\n]\n\nMIDDLEWARE = [\n    'django.middleware.security.SecurityMiddleware',\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.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'will_of_the_prophets.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'will_of_the_prophets.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/2.0/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\n# Password validation\n# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': ('django.contrib.auth.password_validation'\n                 '.UserAttributeSimilarityValidator'),\n    },\n    {\n        'NAME': ('django.contrib.auth.password_validation'\n                 '.MinimumLengthValidator'),\n    },\n    {\n        'NAME': ('django.contrib.auth.password_validation'\n                 '.CommonPasswordValidator'),\n    },\n    {\n        'NAME': ('django.contrib.auth.password_validation'\n                 '.NumericPasswordValidator'),\n    },\n]\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/2.0/topics/i18n/\n\nLANGUAGE_CODE = 'en-us'\n\nTIME_ZONE = 'UTC'\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/2.0/howto/static-files/\n\nSTATIC_URL = '/static/'\n\nSTATICFILES_FINDERS = [\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    # https://github.com/jrief/django-sass-processor\n    'sass_processor.finders.CssFinder',\n]\n\n\n# django-sass-processor\n# https://github.com/jrief/django-sass-processor\nSASS_OUTPUT_STYLE = 'compressed'\n\n\n# django-tz-detect\n# https://github.com/adamcharnock/django-tz-detect\nMIDDLEWARE += [\n    'tz_detect.middleware.TimezoneMiddleware',\n]\n\nTZ_DETECT_COUNTRIES = ('US', 'CN', 'IN', 'JP', 'BR', 'RU', 'DE', 'FR', 'GB')\n\n\n# Configure Django App for Heroku.\ndjango_heroku.settings(locals())\n", "path": "will_of_the_prophets/settings/__init__.py"}]}