We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Docker para desenvolvimento
Precisamos de uma configuração Docker para ambiente de desenvolvimento.
Deve ser montado de forma tal que o desenvolvedor tenha um ambiente rodando apenas seguindo esses dois passos:
1. Clonar o repositório
2. Rodar o docker (via docker compose)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sapl/settings.py`
Content:
```
1 """
2 Django settings for sapl project.
3 
4 Generated by 'django-admin startproject' using Django 1.8.2.
5 
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.8/topics/settings/
8 
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.8/ref/settings/
11 """
12 from unipath import Path
13 
14 from .temp_suppress_crispy_form_warnings import \
15     SUPRESS_CRISPY_FORM_WARNINGS_LOGGING
16 
17 from decouple import config
18 
19 from dj_database_url import parse as db_url
20 
21 BASE_DIR = Path(__file__).ancestor(2)
22 
23 
24 # Quick-start development settings - unsuitable for production
25 # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
26 
27 # SECURITY WARNING: keep the secret key used in production secret!
28 SECRET_KEY = config('SECRET_KEY')
29 
30 # SECURITY WARNING: don't run with debug turned on in production!
31 DEBUG = config('DEBUG', default=False, cast=bool)
32 
33 ALLOWED_HOSTS = ['*']
34 
35 
36 # SAPL business apps in dependency order
37 SAPL_APPS = (
38     'base',
39     'parlamentares',
40     'comissoes',
41     'materia',
42     'norma',
43     'sessao',
44     'lexml',
45     'painel',
46     'protocoloadm',
47     'compilacao',
48 )
49 
50 INSTALLED_APPS = (
51     'django_admin_bootstrapped',  # must come before django.contrib.admin
52     'django.contrib.admin',
53     'django.contrib.auth',
54     'django.contrib.contenttypes',
55     'django.contrib.sessions',
56     'django.contrib.messages',
57     'django.contrib.staticfiles',
58 
59     # more
60     'django_extensions',
61     'djangobower',
62     'bootstrap3',  # basically for django_admin_bootstrapped
63     'crispy_forms',
64     'sass_processor',
65     'rest_framework',
66 
67 ) + SAPL_APPS
68 
69 if DEBUG:
70     INSTALLED_APPS += ('debug_toolbar',)
71 
72 MIDDLEWARE_CLASSES = (
73     'django.contrib.sessions.middleware.SessionMiddleware',
74     'django.middleware.locale.LocaleMiddleware',
75     'django.middleware.common.CommonMiddleware',
76     'django.middleware.csrf.CsrfViewMiddleware',
77     'django.contrib.auth.middleware.AuthenticationMiddleware',
78     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
79     'django.contrib.messages.middleware.MessageMiddleware',
80     'django.middleware.clickjacking.XFrameOptionsMiddleware',
81     'django.middleware.security.SecurityMiddleware',
82 )
83 
84 ROOT_URLCONF = 'sapl.urls'
85 
86 TEMPLATES = [
87     {
88         'BACKEND': 'django.template.backends.django.DjangoTemplates',
89         'DIRS': ['templates'],
90         'APP_DIRS': True,
91         'OPTIONS': {
92             'context_processors': [
93                 'django.template.context_processors.debug',
94                 'django.template.context_processors.request',
95                 'django.contrib.auth.context_processors.auth',
96                 "django.core.context_processors.media",
97                 "django.core.context_processors.static",
98                 'django.contrib.messages.context_processors.messages',
99                 'sapl.context_processors.parliament_info',
100             ],
101             'debug': DEBUG
102         },
103     },
104 ]
105 
106 
107 WSGI_APPLICATION = 'sapl.wsgi.application'
108 
109 # Database
110 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
111 
112 DATABASES = {
113     'default': config(
114         'DATABASE_URL',
115         cast=db_url,
116     )
117 }
118 
119 EMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool)
120 EMAIL_HOST = config('EMAIL_HOST', cast=str)
121 EMAIL_HOST_USER = config('EMAIL_HOST_USER', cast=str)
122 EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', cast=str)
123 EMAIL_PORT = config('EMAIL_PORT', cast=int)
124 
125 MAX_DOC_UPLOAD_SIZE = 5*1024*1024  # 5MB
126 MAX_IMAGE_UPLOAD_SIZE = 2*1024*1024  # 2MB
127 
128 # Internationalization
129 # https://docs.djangoproject.com/en/1.8/topics/i18n/
130 LANGUAGE_CODE = 'pt-br'
131 LANGUAGES = (
132     ('pt-br', u'Português'),
133 )
134 
135 TIME_ZONE = 'America/Sao_Paulo'
136 USE_I18N = True
137 USE_L10N = False
138 USE_TZ = True
139 # DATE_FORMAT = 'N j, Y'
140 DATE_FORMAT = 'd/m/Y'
141 SHORT_DATE_FORMAT = 'd/m/Y'
142 DATE_INPUT_FORMATS = ('%d/%m/%Y', '%m-%d-%Y', '%Y-%m-%d')
143 
144 LOCALE_PATHS = (
145     'locale',
146 )
147 
148 # Static files (CSS, JavaScript, Images)
149 # https://docs.djangoproject.com/en/1.8/howto/static-files/
150 STATIC_URL = '/static/'
151 STATIC_ROOT = BASE_DIR.child("collected_static")
152 STATICFILES_DIRS = (BASE_DIR.child("static"),)
153 STATICFILES_FINDERS = (
154     'django.contrib.staticfiles.finders.FileSystemFinder',
155     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
156     'djangobower.finders.BowerFinder',
157     'sass_processor.finders.CssFinder',
158 )
159 
160 MEDIA_ROOT = BASE_DIR.child("media")
161 MEDIA_URL = '/media/'
162 
163 DAB_FIELD_RENDERER = \
164     'django_admin_bootstrapped.renderers.BootstrapFieldRenderer'
165 CRISPY_TEMPLATE_PACK = 'bootstrap3'
166 CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap3'
167 CRISPY_FAIL_SILENTLY = not DEBUG
168 
169 BOWER_COMPONENTS_ROOT = BASE_DIR.child("bower")
170 BOWER_INSTALLED_APPS = (
171     'bootstrap-sass',
172     'components-font-awesome',
173     'tinymce',
174     'jquery-ui',
175     'jquery-runner',
176     'jQuery-Mask-Plugin',
177     'jsdiff',
178     'https://github.com/hoarrd/drunken-parrot-flat-ui.git',
179 )
180 
181 # Additional search paths for SASS files when using the @import statement
182 SASS_PROCESSOR_INCLUDE_DIRS = (BOWER_COMPONENTS_ROOT.child(
183     'bower_components', 'bootstrap-sass', 'assets', 'stylesheets'),
184 )
185 
186 # FIXME update cripy-forms and remove this
187 # hack to suppress many annoying warnings from crispy_forms
188 # see sapl.temp_suppress_crispy_form_warnings
189 LOGGING = SUPRESS_CRISPY_FORM_WARNINGS_LOGGING
190
```
--- 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()

```

diff --git a/sapl/settings.py b/sapl/settings.py
--- a/sapl/settings.py
+++ b/sapl/settings.py
@@ -168,13 +168,13 @@
 
 BOWER_COMPONENTS_ROOT = BASE_DIR.child("bower")
 BOWER_INSTALLED_APPS = (
-    'bootstrap-sass',
-    'components-font-awesome',
-    'tinymce',
-    'jquery-ui',
-    'jquery-runner',
-    'jQuery-Mask-Plugin',
-    'jsdiff',
+    'bootstrap-sass#3.3.6',
+    'components-font-awesome#4.5.0',
+    'tinymce#4.3.3',
+    'jquery-ui#1.11.4',
+    'jquery-runner#2.3.3',
+    'jQuery-Mask-Plugin#1.13.4',
+    'jsdiff#2.2.1',
     'https://github.com/hoarrd/drunken-parrot-flat-ui.git',
 )

{"golden_diff": "diff --git a/sapl/settings.py b/sapl/settings.py\n--- a/sapl/settings.py\n+++ b/sapl/settings.py\n@@ -168,13 +168,13 @@\n \n BOWER_COMPONENTS_ROOT = BASE_DIR.child(\"bower\")\n BOWER_INSTALLED_APPS = (\n-    'bootstrap-sass',\n-    'components-font-awesome',\n-    'tinymce',\n-    'jquery-ui',\n-    'jquery-runner',\n-    'jQuery-Mask-Plugin',\n-    'jsdiff',\n+    'bootstrap-sass#3.3.6',\n+    'components-font-awesome#4.5.0',\n+    'tinymce#4.3.3',\n+    'jquery-ui#1.11.4',\n+    'jquery-runner#2.3.3',\n+    'jQuery-Mask-Plugin#1.13.4',\n+    'jsdiff#2.2.1',\n     'https://github.com/hoarrd/drunken-parrot-flat-ui.git',\n )\n", "issue": "Docker para desenvolvimento\nPrecisamos de uma configura\u00e7\u00e3o Docker para ambiente de desenvolvimento.\nDeve ser montado de forma tal que o desenvolvedor tenha um ambiente rodando apenas seguindo esses dois passos:\n1. Clonar o reposit\u00f3rio\n2. Rodar o docker (via docker compose)\n\n", "before_files": [{"content": "\"\"\"\nDjango settings for sapl project.\n\nGenerated by 'django-admin startproject' using Django 1.8.2.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.8/ref/settings/\n\"\"\"\nfrom unipath import Path\n\nfrom .temp_suppress_crispy_form_warnings import \\\n    SUPRESS_CRISPY_FORM_WARNINGS_LOGGING\n\nfrom decouple import config\n\nfrom dj_database_url import parse as db_url\n\nBASE_DIR = Path(__file__).ancestor(2)\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = config('SECRET_KEY')\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = config('DEBUG', default=False, cast=bool)\n\nALLOWED_HOSTS = ['*']\n\n\n# SAPL business apps in dependency order\nSAPL_APPS = (\n    'base',\n    'parlamentares',\n    'comissoes',\n    'materia',\n    'norma',\n    'sessao',\n    'lexml',\n    'painel',\n    'protocoloadm',\n    'compilacao',\n)\n\nINSTALLED_APPS = (\n    'django_admin_bootstrapped',  # must come before django.contrib.admin\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    # more\n    'django_extensions',\n    'djangobower',\n    'bootstrap3',  # basically for django_admin_bootstrapped\n    'crispy_forms',\n    'sass_processor',\n    'rest_framework',\n\n) + SAPL_APPS\n\nif DEBUG:\n    INSTALLED_APPS += ('debug_toolbar',)\n\nMIDDLEWARE_CLASSES = (\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.locale.LocaleMiddleware',\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    'django.middleware.security.SecurityMiddleware',\n)\n\nROOT_URLCONF = 'sapl.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': ['templates'],\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.core.context_processors.media\",\n                \"django.core.context_processors.static\",\n                'django.contrib.messages.context_processors.messages',\n                'sapl.context_processors.parliament_info',\n            ],\n            'debug': DEBUG\n        },\n    },\n]\n\n\nWSGI_APPLICATION = 'sapl.wsgi.application'\n\n# Database\n# https://docs.djangoproject.com/en/1.8/ref/settings/#databases\n\nDATABASES = {\n    'default': config(\n        'DATABASE_URL',\n        cast=db_url,\n    )\n}\n\nEMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool)\nEMAIL_HOST = config('EMAIL_HOST', cast=str)\nEMAIL_HOST_USER = config('EMAIL_HOST_USER', cast=str)\nEMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', cast=str)\nEMAIL_PORT = config('EMAIL_PORT', cast=int)\n\nMAX_DOC_UPLOAD_SIZE = 5*1024*1024  # 5MB\nMAX_IMAGE_UPLOAD_SIZE = 2*1024*1024  # 2MB\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.8/topics/i18n/\nLANGUAGE_CODE = 'pt-br'\nLANGUAGES = (\n    ('pt-br', u'Portugu\u00eas'),\n)\n\nTIME_ZONE = 'America/Sao_Paulo'\nUSE_I18N = True\nUSE_L10N = False\nUSE_TZ = True\n# DATE_FORMAT = 'N j, Y'\nDATE_FORMAT = 'd/m/Y'\nSHORT_DATE_FORMAT = 'd/m/Y'\nDATE_INPUT_FORMATS = ('%d/%m/%Y', '%m-%d-%Y', '%Y-%m-%d')\n\nLOCALE_PATHS = (\n    'locale',\n)\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.8/howto/static-files/\nSTATIC_URL = '/static/'\nSTATIC_ROOT = BASE_DIR.child(\"collected_static\")\nSTATICFILES_DIRS = (BASE_DIR.child(\"static\"),)\nSTATICFILES_FINDERS = (\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    'djangobower.finders.BowerFinder',\n    'sass_processor.finders.CssFinder',\n)\n\nMEDIA_ROOT = BASE_DIR.child(\"media\")\nMEDIA_URL = '/media/'\n\nDAB_FIELD_RENDERER = \\\n    'django_admin_bootstrapped.renderers.BootstrapFieldRenderer'\nCRISPY_TEMPLATE_PACK = 'bootstrap3'\nCRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap3'\nCRISPY_FAIL_SILENTLY = not DEBUG\n\nBOWER_COMPONENTS_ROOT = BASE_DIR.child(\"bower\")\nBOWER_INSTALLED_APPS = (\n    'bootstrap-sass',\n    'components-font-awesome',\n    'tinymce',\n    'jquery-ui',\n    'jquery-runner',\n    'jQuery-Mask-Plugin',\n    'jsdiff',\n    'https://github.com/hoarrd/drunken-parrot-flat-ui.git',\n)\n\n# Additional search paths for SASS files when using the @import statement\nSASS_PROCESSOR_INCLUDE_DIRS = (BOWER_COMPONENTS_ROOT.child(\n    'bower_components', 'bootstrap-sass', 'assets', 'stylesheets'),\n)\n\n# FIXME update cripy-forms and remove this\n# hack to suppress many annoying warnings from crispy_forms\n# see sapl.temp_suppress_crispy_form_warnings\nLOGGING = SUPRESS_CRISPY_FORM_WARNINGS_LOGGING\n", "path": "sapl/settings.py"}], "after_files": [{"content": "\"\"\"\nDjango settings for sapl project.\n\nGenerated by 'django-admin startproject' using Django 1.8.2.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.8/ref/settings/\n\"\"\"\nfrom unipath import Path\n\nfrom .temp_suppress_crispy_form_warnings import \\\n    SUPRESS_CRISPY_FORM_WARNINGS_LOGGING\n\nfrom decouple import config\n\nfrom dj_database_url import parse as db_url\n\nBASE_DIR = Path(__file__).ancestor(2)\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = config('SECRET_KEY')\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = config('DEBUG', default=False, cast=bool)\n\nALLOWED_HOSTS = ['*']\n\n\n# SAPL business apps in dependency order\nSAPL_APPS = (\n    'base',\n    'parlamentares',\n    'comissoes',\n    'materia',\n    'norma',\n    'sessao',\n    'lexml',\n    'painel',\n    'protocoloadm',\n    'compilacao',\n)\n\nINSTALLED_APPS = (\n    'django_admin_bootstrapped',  # must come before django.contrib.admin\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    # more\n    'django_extensions',\n    'djangobower',\n    'bootstrap3',  # basically for django_admin_bootstrapped\n    'crispy_forms',\n    'sass_processor',\n    'rest_framework',\n\n) + SAPL_APPS\n\nif DEBUG:\n    INSTALLED_APPS += ('debug_toolbar',)\n\nMIDDLEWARE_CLASSES = (\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.locale.LocaleMiddleware',\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    'django.middleware.security.SecurityMiddleware',\n)\n\nROOT_URLCONF = 'sapl.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': ['templates'],\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.core.context_processors.media\",\n                \"django.core.context_processors.static\",\n                'django.contrib.messages.context_processors.messages',\n                'sapl.context_processors.parliament_info',\n            ],\n            'debug': DEBUG\n        },\n    },\n]\n\n\nWSGI_APPLICATION = 'sapl.wsgi.application'\n\n# Database\n# https://docs.djangoproject.com/en/1.8/ref/settings/#databases\n\nDATABASES = {\n    'default': config(\n        'DATABASE_URL',\n        cast=db_url,\n    )\n}\n\nEMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool)\nEMAIL_HOST = config('EMAIL_HOST', cast=str)\nEMAIL_HOST_USER = config('EMAIL_HOST_USER', cast=str)\nEMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', cast=str)\nEMAIL_PORT = config('EMAIL_PORT', cast=int)\n\nMAX_DOC_UPLOAD_SIZE = 5*1024*1024  # 5MB\nMAX_IMAGE_UPLOAD_SIZE = 2*1024*1024  # 2MB\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.8/topics/i18n/\nLANGUAGE_CODE = 'pt-br'\nLANGUAGES = (\n    ('pt-br', u'Portugu\u00eas'),\n)\n\nTIME_ZONE = 'America/Sao_Paulo'\nUSE_I18N = True\nUSE_L10N = False\nUSE_TZ = True\n# DATE_FORMAT = 'N j, Y'\nDATE_FORMAT = 'd/m/Y'\nSHORT_DATE_FORMAT = 'd/m/Y'\nDATE_INPUT_FORMATS = ('%d/%m/%Y', '%m-%d-%Y', '%Y-%m-%d')\n\nLOCALE_PATHS = (\n    'locale',\n)\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.8/howto/static-files/\nSTATIC_URL = '/static/'\nSTATIC_ROOT = BASE_DIR.child(\"collected_static\")\nSTATICFILES_DIRS = (BASE_DIR.child(\"static\"),)\nSTATICFILES_FINDERS = (\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n    'djangobower.finders.BowerFinder',\n    'sass_processor.finders.CssFinder',\n)\n\nMEDIA_ROOT = BASE_DIR.child(\"media\")\nMEDIA_URL = '/media/'\n\nDAB_FIELD_RENDERER = \\\n    'django_admin_bootstrapped.renderers.BootstrapFieldRenderer'\nCRISPY_TEMPLATE_PACK = 'bootstrap3'\nCRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap3'\nCRISPY_FAIL_SILENTLY = not DEBUG\n\nBOWER_COMPONENTS_ROOT = BASE_DIR.child(\"bower\")\nBOWER_INSTALLED_APPS = (\n    'bootstrap-sass#3.3.6',\n    'components-font-awesome#4.5.0',\n    'tinymce#4.3.3',\n    'jquery-ui#1.11.4',\n    'jquery-runner#2.3.3',\n    'jQuery-Mask-Plugin#1.13.4',\n    'jsdiff#2.2.1',\n    'https://github.com/hoarrd/drunken-parrot-flat-ui.git',\n)\n\n# Additional search paths for SASS files when using the @import statement\nSASS_PROCESSOR_INCLUDE_DIRS = (BOWER_COMPONENTS_ROOT.child(\n    'bower_components', 'bootstrap-sass', 'assets', 'stylesheets'),\n)\n\n# FIXME update cripy-forms and remove this\n# hack to suppress many annoying warnings from crispy_forms\n# see sapl.temp_suppress_crispy_form_warnings\nLOGGING = SUPRESS_CRISPY_FORM_WARNINGS_LOGGING\n", "path": "sapl/settings.py"}]}