We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Aumenta o tamanho máximo de arquivos de upload para 10MB
Atualmente o tamanho máximo de arquivos de upload é de 5MB. Ao menos uma casa reclamou que este tamanho é insuficiente então vamos dobrar e ver se mais alguém ainda reclama do tamanho de 10MB.

--- 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 Quick-start development settings - unsuitable for production
13 See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
14 
15 """
16 import logging
17 
18 from decouple import config
19 from dj_database_url import parse as db_url
20 from unipath import Path
21 
22 from .temp_suppress_crispy_form_warnings import \
23     SUPRESS_CRISPY_FORM_WARNINGS_LOGGING
24 
25 BASE_DIR = Path(__file__).ancestor(1)
26 PROJECT_DIR = Path(__file__).ancestor(2)
27 
28 
29 # SECURITY WARNING: keep the secret key used in production secret!
30 SECRET_KEY = config('SECRET_KEY', default='')
31 # SECURITY WARNING: don't run with debug turned on in production!
32 DEBUG = config('DEBUG', default=False, cast=bool)
33 
34 MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
35 
36 ALLOWED_HOSTS = ['*']
37 
38 LOGIN_REDIRECT_URL = '/'
39 LOGIN_URL = '/login/?next='
40 
41 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
42 
43 
44 # SAPL business apps in dependency order
45 SAPL_APPS = (
46     'sapl.base',
47     'sapl.crud',
48     'sapl.parlamentares',
49     'sapl.comissoes',
50     'sapl.materia',
51     'sapl.norma',
52     'sapl.sessao',
53     'sapl.lexml',
54     'sapl.painel',
55     'sapl.protocoloadm',
56     'sapl.redireciona_urls',
57     'sapl.compilacao',
58     'sapl.api',
59 
60     'sapl.rules'
61 
62 )
63 
64 INSTALLED_APPS = (
65     'django_admin_bootstrapped',  # must come before django.contrib.admin
66     'django.contrib.admin',
67     'django.contrib.auth',
68     'django.contrib.contenttypes',
69     'django.contrib.sessions',
70     'django.contrib.messages',
71     'django.contrib.staticfiles',
72 
73     # more
74     'django_extensions',
75     'djangobower',
76     'bootstrap3',  # basically for django_admin_bootstrapped
77     'crispy_forms',
78     'easy_thumbnails',
79     'floppyforms',
80     'haystack',
81     'sass_processor',
82     'rest_framework',
83     'reversion',
84     'whoosh',
85 
86 ) + SAPL_APPS
87 
88 # FTS = Full Text Search
89 SEARCH_BACKEND = 'haystack.backends.whoosh_backend.WhooshEngine'
90 SEARCH_URL = ('PATH', PROJECT_DIR.child('whoosh'))
91 
92 SOLR_URL = config('SOLR_URL', cast=str, default='')
93 if SOLR_URL:
94     SEARCH_BACKEND = 'haystack.backends.solr_backend.SolrEngine'
95     SEARCH_URL = ('URL', config('SOLR_URL', cast=str))
96     # ...or for multicore...
97     # 'URL': 'http://127.0.0.1:8983/solr/mysite',
98 
99 
100 HAYSTACK_CONNECTIONS = {
101     'default': {
102         'ENGINE': SEARCH_BACKEND,
103         SEARCH_URL[0] : SEARCH_URL[1]
104     },
105 }
106 
107 
108 if DEBUG:
109     INSTALLED_APPS += ('debug_toolbar', 'rest_framework_docs',)
110 
111 MIDDLEWARE_CLASSES = (
112     'reversion.middleware.RevisionMiddleware',
113     'django.contrib.sessions.middleware.SessionMiddleware',
114     'django.middleware.locale.LocaleMiddleware',
115     'django.middleware.common.CommonMiddleware',
116     'django.middleware.csrf.CsrfViewMiddleware',
117     'django.contrib.auth.middleware.AuthenticationMiddleware',
118     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
119     'django.contrib.messages.middleware.MessageMiddleware',
120     'django.middleware.clickjacking.XFrameOptionsMiddleware',
121     'django.middleware.security.SecurityMiddleware',
122 )
123 
124 
125 REST_FRAMEWORK = {
126     "UNICODE_JSON": False,
127     "DEFAULT_PARSER_CLASSES": (
128         "rest_framework.parsers.JSONParser",
129     ),
130     "DEFAULT_PERMISSION_CLASSES": (
131         "rest_framework.permissions.IsAuthenticated",
132         "sapl.api.permissions.DjangoModelPermissions",
133     ),
134     "DEFAULT_AUTHENTICATION_CLASSES": (
135         "rest_framework.authentication.SessionAuthentication",
136     ),
137     "DEFAULT_PAGINATION_CLASS": "sapl.api.pagination.StandardPagination",
138     "DEFAULT_FILTER_BACKENDS": (
139         "rest_framework.filters.SearchFilter",
140         "rest_framework.filters.DjangoFilterBackend",
141     ),
142 }
143 
144 
145 ROOT_URLCONF = 'sapl.urls'
146 
147 TEMPLATES = [
148     {
149         'BACKEND': 'django.template.backends.django.DjangoTemplates',
150         'DIRS': ['sapl/templates'],
151         'APP_DIRS': True,
152         'OPTIONS': {
153             'context_processors': [
154                 'django.template.context_processors.debug',
155                 'django.template.context_processors.request',
156                 'django.contrib.auth.context_processors.auth',
157                 "django.template.context_processors.media",
158                 "django.template.context_processors.static",
159                 'django.contrib.messages.context_processors.messages',
160                 'sapl.context_processors.parliament_info',
161             ],
162             'debug': DEBUG
163         },
164     },
165 ]
166 
167 
168 WSGI_APPLICATION = 'sapl.wsgi.application'
169 
170 # Database
171 # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
172 
173 DATABASES = {
174     'default': config(
175         'DATABASE_URL', default='sqlite://:memory:',
176         cast=db_url,
177     )
178 }
179 
180 # troque no caso de reimplementação da classe User conforme
181 # https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#substituting-a-custom-user-model
182 AUTH_USER_MODEL = 'auth.User'
183 
184 X_FRAME_OPTIONS = 'ALLOWALL'
185 
186 EMAIL_HOST = config('EMAIL_HOST', default='localhost')
187 EMAIL_PORT = config('EMAIL_PORT', cast=int, default=587)
188 EMAIL_HOST_USER = config('EMAIL_HOST_USER', default='')
189 EMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', default='')
190 EMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool, default=True)
191 EMAIL_SEND_USER = config('EMAIL_SEND_USER', cast=str, default='')
192 DEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL', cast=str, default='')
193 SERVER_EMAIL = config('SERVER_EMAIL', cast=str, default='')
194 
195 MAX_DOC_UPLOAD_SIZE = 5 * 1024 * 1024  # 5MB
196 MAX_IMAGE_UPLOAD_SIZE = 2 * 1024 * 1024  # 2MB
197 
198 # Internationalization
199 # https://docs.djangoproject.com/en/1.8/topics/i18n/
200 LANGUAGE_CODE = 'pt-br'
201 LANGUAGES = (
202     ('pt-br', u'Português'),
203 )
204 
205 TIME_ZONE = 'America/Sao_Paulo'
206 USE_I18N = True
207 USE_L10N = False
208 USE_TZ = False
209 # DATE_FORMAT = 'N j, Y'
210 DATE_FORMAT = 'd/m/Y'
211 SHORT_DATE_FORMAT = 'd/m/Y'
212 DATETIME_FORMAT = 'd/m/Y H:i:s'
213 SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
214 DATE_INPUT_FORMATS = ('%d/%m/%Y', '%m-%d-%Y', '%Y-%m-%d')
215 
216 LOCALE_PATHS = (
217     'locale',
218 )
219 
220 # Static files (CSS, JavaScript, Images)
221 # https://docs.djangoproject.com/en/1.8/howto/static-files/
222 
223 STATIC_URL = '/static/'
224 STATIC_ROOT = PROJECT_DIR.child("collected_static")
225 STATICFILES_DIRS = (BASE_DIR.child("static"),)
226 STATICFILES_FINDERS = (
227     'django.contrib.staticfiles.finders.FileSystemFinder',
228     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
229     'djangobower.finders.BowerFinder',
230     'sass_processor.finders.CssFinder',
231 )
232 
233 MEDIA_ROOT = PROJECT_DIR.child("media")
234 MEDIA_URL = '/media/'
235 
236 DAB_FIELD_RENDERER = \
237     'django_admin_bootstrapped.renderers.BootstrapFieldRenderer'
238 CRISPY_TEMPLATE_PACK = 'bootstrap3'
239 CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap3'
240 CRISPY_FAIL_SILENTLY = not DEBUG
241 
242 BOWER_COMPONENTS_ROOT = PROJECT_DIR.child("bower")
243 BOWER_INSTALLED_APPS = (
244     'jquery#3.1.1',
245     'bootstrap-sass#3.3.7',
246     'components-font-awesome#4.5.0',
247     'tinymce#4.3.8',
248     'jquery-ui#1.12.1',
249     'jQuery-Mask-Plugin#1.14.0',
250     'jsdiff#2.2.2',
251     'https://github.com/interlegis/drunken-parrot-flat-ui.git',
252     'jquery-query-object#2.2.3',
253 )
254 
255 # Additional search paths for SASS files when using the @import statement
256 SASS_PROCESSOR_INCLUDE_DIRS = (BOWER_COMPONENTS_ROOT.child(
257     'bower_components', 'bootstrap-sass', 'assets', 'stylesheets'),
258 )
259 
260 # suprime texto de ajuda default do django-filter
261 FILTERS_HELP_TEXT_FILTER = False
262 
263 
264 # FIXME update cripy-forms and remove this
265 # hack to suppress many annoying warnings from crispy_forms
266 # see sapl.temp_suppress_crispy_form_warnings
267 LOGGING = SUPRESS_CRISPY_FORM_WARNINGS_LOGGING
268 
269 
270 LOGGING_CONSOLE = config('LOGGING_CONSOLE', default=False, cast=bool)
271 if DEBUG and LOGGING_CONSOLE:
272     # Descomentar linha abaixo fará com que logs aparecam, inclusive SQL
273     # LOGGING['handlers']['console']['level'] = 'DEBUG'
274     LOGGING['loggers']['django']['level'] = 'DEBUG'
275     LOGGING.update({
276         'formatters': {
277             'verbose': {
278                 'format': '%(levelname)s %(asctime)s %(pathname)s '
279                 '%(funcName)s %(message)s'
280             },
281             'simple': {
282                 'format': '%(levelname)s %(message)s'
283             },
284         },
285     })
286     LOGGING['handlers']['console']['formatter'] = 'verbose'
287     LOGGING['loggers'][BASE_DIR.name] = {
288         'handlers': ['console'],
289         'level': 'DEBUG',
290     }
291 
292 
293 def excepthook(*args):
294     logging.getLogger(BASE_DIR.name).error(
295         'Uncaught exception:', exc_info=args)
296 
297 # sys.excepthook = excepthook
298
```
--- 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
@@ -192,7 +192,7 @@
 DEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL', cast=str, default='')
 SERVER_EMAIL = config('SERVER_EMAIL', cast=str, default='')
 
-MAX_DOC_UPLOAD_SIZE = 5 * 1024 * 1024  # 5MB
+MAX_DOC_UPLOAD_SIZE = 10 * 1024 * 1024  # 10MB
 MAX_IMAGE_UPLOAD_SIZE = 2 * 1024 * 1024  # 2MB
 
 # Internationalization

{"golden_diff": "diff --git a/sapl/settings.py b/sapl/settings.py\n--- a/sapl/settings.py\n+++ b/sapl/settings.py\n@@ -192,7 +192,7 @@\n DEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL', cast=str, default='')\n SERVER_EMAIL = config('SERVER_EMAIL', cast=str, default='')\n \n-MAX_DOC_UPLOAD_SIZE = 5 * 1024 * 1024  # 5MB\n+MAX_DOC_UPLOAD_SIZE = 10 * 1024 * 1024  # 10MB\n MAX_IMAGE_UPLOAD_SIZE = 2 * 1024 * 1024  # 2MB\n \n # Internationalization\n", "issue": "Aumenta o tamanho m\u00e1ximo de arquivos de upload para 10MB\nAtualmente o tamanho m\u00e1ximo de arquivos de upload \u00e9 de 5MB. Ao menos uma casa reclamou que este tamanho \u00e9 insuficiente ent\u00e3o vamos dobrar e ver se mais algu\u00e9m ainda reclama do tamanho de 10MB.\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\nQuick-start development settings - unsuitable for production\nSee https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/\n\n\"\"\"\nimport logging\n\nfrom decouple import config\nfrom dj_database_url import parse as db_url\nfrom unipath import Path\n\nfrom .temp_suppress_crispy_form_warnings import \\\n    SUPRESS_CRISPY_FORM_WARNINGS_LOGGING\n\nBASE_DIR = Path(__file__).ancestor(1)\nPROJECT_DIR = Path(__file__).ancestor(2)\n\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = config('SECRET_KEY', default='')\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = config('DEBUG', default=False, cast=bool)\n\nMESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'\n\nALLOWED_HOSTS = ['*']\n\nLOGIN_REDIRECT_URL = '/'\nLOGIN_URL = '/login/?next='\n\nEMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'\n\n\n# SAPL business apps in dependency order\nSAPL_APPS = (\n    'sapl.base',\n    'sapl.crud',\n    'sapl.parlamentares',\n    'sapl.comissoes',\n    'sapl.materia',\n    'sapl.norma',\n    'sapl.sessao',\n    'sapl.lexml',\n    'sapl.painel',\n    'sapl.protocoloadm',\n    'sapl.redireciona_urls',\n    'sapl.compilacao',\n    'sapl.api',\n\n    'sapl.rules'\n\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    'easy_thumbnails',\n    'floppyforms',\n    'haystack',\n    'sass_processor',\n    'rest_framework',\n    'reversion',\n    'whoosh',\n\n) + SAPL_APPS\n\n# FTS = Full Text Search\nSEARCH_BACKEND = 'haystack.backends.whoosh_backend.WhooshEngine'\nSEARCH_URL = ('PATH', PROJECT_DIR.child('whoosh'))\n\nSOLR_URL = config('SOLR_URL', cast=str, default='')\nif SOLR_URL:\n    SEARCH_BACKEND = 'haystack.backends.solr_backend.SolrEngine'\n    SEARCH_URL = ('URL', config('SOLR_URL', cast=str))\n    # ...or for multicore...\n    # 'URL': 'http://127.0.0.1:8983/solr/mysite',\n\n\nHAYSTACK_CONNECTIONS = {\n    'default': {\n        'ENGINE': SEARCH_BACKEND,\n        SEARCH_URL[0] : SEARCH_URL[1]\n    },\n}\n\n\nif DEBUG:\n    INSTALLED_APPS += ('debug_toolbar', 'rest_framework_docs',)\n\nMIDDLEWARE_CLASSES = (\n    'reversion.middleware.RevisionMiddleware',\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\n\nREST_FRAMEWORK = {\n    \"UNICODE_JSON\": False,\n    \"DEFAULT_PARSER_CLASSES\": (\n        \"rest_framework.parsers.JSONParser\",\n    ),\n    \"DEFAULT_PERMISSION_CLASSES\": (\n        \"rest_framework.permissions.IsAuthenticated\",\n        \"sapl.api.permissions.DjangoModelPermissions\",\n    ),\n    \"DEFAULT_AUTHENTICATION_CLASSES\": (\n        \"rest_framework.authentication.SessionAuthentication\",\n    ),\n    \"DEFAULT_PAGINATION_CLASS\": \"sapl.api.pagination.StandardPagination\",\n    \"DEFAULT_FILTER_BACKENDS\": (\n        \"rest_framework.filters.SearchFilter\",\n        \"rest_framework.filters.DjangoFilterBackend\",\n    ),\n}\n\n\nROOT_URLCONF = 'sapl.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': ['sapl/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.template.context_processors.media\",\n                \"django.template.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', default='sqlite://:memory:',\n        cast=db_url,\n    )\n}\n\n# troque no caso de reimplementa\u00e7\u00e3o da classe User conforme\n# https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#substituting-a-custom-user-model\nAUTH_USER_MODEL = 'auth.User'\n\nX_FRAME_OPTIONS = 'ALLOWALL'\n\nEMAIL_HOST = config('EMAIL_HOST', default='localhost')\nEMAIL_PORT = config('EMAIL_PORT', cast=int, default=587)\nEMAIL_HOST_USER = config('EMAIL_HOST_USER', default='')\nEMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', default='')\nEMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool, default=True)\nEMAIL_SEND_USER = config('EMAIL_SEND_USER', cast=str, default='')\nDEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL', cast=str, default='')\nSERVER_EMAIL = config('SERVER_EMAIL', cast=str, default='')\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 = False\n# DATE_FORMAT = 'N j, Y'\nDATE_FORMAT = 'd/m/Y'\nSHORT_DATE_FORMAT = 'd/m/Y'\nDATETIME_FORMAT = 'd/m/Y H:i:s'\nSHORT_DATETIME_FORMAT = 'd/m/Y H:i'\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/\n\nSTATIC_URL = '/static/'\nSTATIC_ROOT = PROJECT_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 = PROJECT_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 = PROJECT_DIR.child(\"bower\")\nBOWER_INSTALLED_APPS = (\n    'jquery#3.1.1',\n    'bootstrap-sass#3.3.7',\n    'components-font-awesome#4.5.0',\n    'tinymce#4.3.8',\n    'jquery-ui#1.12.1',\n    'jQuery-Mask-Plugin#1.14.0',\n    'jsdiff#2.2.2',\n    'https://github.com/interlegis/drunken-parrot-flat-ui.git',\n    'jquery-query-object#2.2.3',\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# suprime texto de ajuda default do django-filter\nFILTERS_HELP_TEXT_FILTER = False\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\n\nLOGGING_CONSOLE = config('LOGGING_CONSOLE', default=False, cast=bool)\nif DEBUG and LOGGING_CONSOLE:\n    # Descomentar linha abaixo far\u00e1 com que logs aparecam, inclusive SQL\n    # LOGGING['handlers']['console']['level'] = 'DEBUG'\n    LOGGING['loggers']['django']['level'] = 'DEBUG'\n    LOGGING.update({\n        'formatters': {\n            'verbose': {\n                'format': '%(levelname)s %(asctime)s %(pathname)s '\n                '%(funcName)s %(message)s'\n            },\n            'simple': {\n                'format': '%(levelname)s %(message)s'\n            },\n        },\n    })\n    LOGGING['handlers']['console']['formatter'] = 'verbose'\n    LOGGING['loggers'][BASE_DIR.name] = {\n        'handlers': ['console'],\n        'level': 'DEBUG',\n    }\n\n\ndef excepthook(*args):\n    logging.getLogger(BASE_DIR.name).error(\n        'Uncaught exception:', exc_info=args)\n\n# sys.excepthook = excepthook\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\nQuick-start development settings - unsuitable for production\nSee https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/\n\n\"\"\"\nimport logging\n\nfrom decouple import config\nfrom dj_database_url import parse as db_url\nfrom unipath import Path\n\nfrom .temp_suppress_crispy_form_warnings import \\\n    SUPRESS_CRISPY_FORM_WARNINGS_LOGGING\n\nBASE_DIR = Path(__file__).ancestor(1)\nPROJECT_DIR = Path(__file__).ancestor(2)\n\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = config('SECRET_KEY', default='')\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = config('DEBUG', default=False, cast=bool)\n\nMESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'\n\nALLOWED_HOSTS = ['*']\n\nLOGIN_REDIRECT_URL = '/'\nLOGIN_URL = '/login/?next='\n\nEMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'\n\n\n# SAPL business apps in dependency order\nSAPL_APPS = (\n    'sapl.base',\n    'sapl.crud',\n    'sapl.parlamentares',\n    'sapl.comissoes',\n    'sapl.materia',\n    'sapl.norma',\n    'sapl.sessao',\n    'sapl.lexml',\n    'sapl.painel',\n    'sapl.protocoloadm',\n    'sapl.redireciona_urls',\n    'sapl.compilacao',\n    'sapl.api',\n\n    'sapl.rules'\n\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    'easy_thumbnails',\n    'floppyforms',\n    'haystack',\n    'sass_processor',\n    'rest_framework',\n    'reversion',\n    'whoosh',\n\n) + SAPL_APPS\n\n# FTS = Full Text Search\nSEARCH_BACKEND = 'haystack.backends.whoosh_backend.WhooshEngine'\nSEARCH_URL = ('PATH', PROJECT_DIR.child('whoosh'))\n\nSOLR_URL = config('SOLR_URL', cast=str, default='')\nif SOLR_URL:\n    SEARCH_BACKEND = 'haystack.backends.solr_backend.SolrEngine'\n    SEARCH_URL = ('URL', config('SOLR_URL', cast=str))\n    # ...or for multicore...\n    # 'URL': 'http://127.0.0.1:8983/solr/mysite',\n\n\nHAYSTACK_CONNECTIONS = {\n    'default': {\n        'ENGINE': SEARCH_BACKEND,\n        SEARCH_URL[0] : SEARCH_URL[1]\n    },\n}\n\n\nif DEBUG:\n    INSTALLED_APPS += ('debug_toolbar', 'rest_framework_docs',)\n\nMIDDLEWARE_CLASSES = (\n    'reversion.middleware.RevisionMiddleware',\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\n\nREST_FRAMEWORK = {\n    \"UNICODE_JSON\": False,\n    \"DEFAULT_PARSER_CLASSES\": (\n        \"rest_framework.parsers.JSONParser\",\n    ),\n    \"DEFAULT_PERMISSION_CLASSES\": (\n        \"rest_framework.permissions.IsAuthenticated\",\n        \"sapl.api.permissions.DjangoModelPermissions\",\n    ),\n    \"DEFAULT_AUTHENTICATION_CLASSES\": (\n        \"rest_framework.authentication.SessionAuthentication\",\n    ),\n    \"DEFAULT_PAGINATION_CLASS\": \"sapl.api.pagination.StandardPagination\",\n    \"DEFAULT_FILTER_BACKENDS\": (\n        \"rest_framework.filters.SearchFilter\",\n        \"rest_framework.filters.DjangoFilterBackend\",\n    ),\n}\n\n\nROOT_URLCONF = 'sapl.urls'\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': ['sapl/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.template.context_processors.media\",\n                \"django.template.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', default='sqlite://:memory:',\n        cast=db_url,\n    )\n}\n\n# troque no caso de reimplementa\u00e7\u00e3o da classe User conforme\n# https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#substituting-a-custom-user-model\nAUTH_USER_MODEL = 'auth.User'\n\nX_FRAME_OPTIONS = 'ALLOWALL'\n\nEMAIL_HOST = config('EMAIL_HOST', default='localhost')\nEMAIL_PORT = config('EMAIL_PORT', cast=int, default=587)\nEMAIL_HOST_USER = config('EMAIL_HOST_USER', default='')\nEMAIL_HOST_PASSWORD = config('EMAIL_HOST_PASSWORD', default='')\nEMAIL_USE_TLS = config('EMAIL_USE_TLS', cast=bool, default=True)\nEMAIL_SEND_USER = config('EMAIL_SEND_USER', cast=str, default='')\nDEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL', cast=str, default='')\nSERVER_EMAIL = config('SERVER_EMAIL', cast=str, default='')\n\nMAX_DOC_UPLOAD_SIZE = 10 * 1024 * 1024  # 10MB\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 = False\n# DATE_FORMAT = 'N j, Y'\nDATE_FORMAT = 'd/m/Y'\nSHORT_DATE_FORMAT = 'd/m/Y'\nDATETIME_FORMAT = 'd/m/Y H:i:s'\nSHORT_DATETIME_FORMAT = 'd/m/Y H:i'\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/\n\nSTATIC_URL = '/static/'\nSTATIC_ROOT = PROJECT_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 = PROJECT_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 = PROJECT_DIR.child(\"bower\")\nBOWER_INSTALLED_APPS = (\n    'jquery#3.1.1',\n    'bootstrap-sass#3.3.7',\n    'components-font-awesome#4.5.0',\n    'tinymce#4.3.8',\n    'jquery-ui#1.12.1',\n    'jQuery-Mask-Plugin#1.14.0',\n    'jsdiff#2.2.2',\n    'https://github.com/interlegis/drunken-parrot-flat-ui.git',\n    'jquery-query-object#2.2.3',\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# suprime texto de ajuda default do django-filter\nFILTERS_HELP_TEXT_FILTER = False\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\n\nLOGGING_CONSOLE = config('LOGGING_CONSOLE', default=False, cast=bool)\nif DEBUG and LOGGING_CONSOLE:\n    # Descomentar linha abaixo far\u00e1 com que logs aparecam, inclusive SQL\n    # LOGGING['handlers']['console']['level'] = 'DEBUG'\n    LOGGING['loggers']['django']['level'] = 'DEBUG'\n    LOGGING.update({\n        'formatters': {\n            'verbose': {\n                'format': '%(levelname)s %(asctime)s %(pathname)s '\n                '%(funcName)s %(message)s'\n            },\n            'simple': {\n                'format': '%(levelname)s %(message)s'\n            },\n        },\n    })\n    LOGGING['handlers']['console']['formatter'] = 'verbose'\n    LOGGING['loggers'][BASE_DIR.name] = {\n        'handlers': ['console'],\n        'level': 'DEBUG',\n    }\n\n\ndef excepthook(*args):\n    logging.getLogger(BASE_DIR.name).error(\n        'Uncaught exception:', exc_info=args)\n\n# sys.excepthook = excepthook\n", "path": "sapl/settings.py"}]}