We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
include the debug toolbar
we should include the debug toolbar so it shows up whenever debug mode is enabled. all pages with lots of sql statements will take about 3x the time to load, but the issue is not the toolbar, but the number of queries then :)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `evap/urls.py`
Content:
```
1 from django.conf import settings
2 from django.conf.urls import patterns, include, url
3 
4 # Uncomment the next two lines to enable the admin:
5 from django.contrib import admin
6 admin.autodiscover()
7 
8 urlpatterns = patterns('',
9     url(r"^$", 'evap.evaluation.views.index'),
10     url(r"^faq$", 'evap.evaluation.views.faq'),
11     url(r"^logout$", 'django.contrib.auth.views.logout', {'next_page': "/"}),
12 
13     url(r"^fsr/", include('evap.fsr.urls')),
14     url(r"^results/", include('evap.results.urls')),
15     url(r"^student/", include('evap.student.urls')),
16     url(r"^contributor/", include('evap.contributor.urls')),
17 
18     url(r'^i18n/', include('django.conf.urls.i18n')),
19     url(r"^admin/", include(admin.site.urls)),
20 )
21 
22 if settings.DEBUG:
23     urlpatterns += patterns('',
24         url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
25    )
26
```

Path: `evap/settings.py`
Content:
```
1 # Django settings for evap project.
2 
3 # automatically determine SITE_ROOT, used for absolute paths below
4 import os.path
5 SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
6 
7 DEBUG = True
8 TEMPLATE_DEBUG = DEBUG
9 
10 ADMINS = (
11     # ('Your Name', 'your_email@example.com'),
12 )
13 
14 MANAGERS = ADMINS
15 
16 DATABASES = {
17     'default': {
18         'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
19         'NAME': os.path.join(SITE_ROOT, 'database.sqlite3'), # Or path to database file if using sqlite3.
20         'USER': '',                             # Not used with sqlite3.
21         'PASSWORD': '',                         # Not used with sqlite3.
22         'HOST': '',                             # Set to empty string for localhost. Not used with sqlite3.
23         'PORT': '',                             # Set to empty string for default. Not used with sqlite3.
24     }
25 }
26 
27 CACHES = {
28     'default': {
29     #    'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
30         'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
31     }
32 }
33 
34 # config for feedback links
35 FEEDBACK_EMAIL = "webmaster@localhost"
36 TRACKER_URL = "https://github.com/fsr-itse/EvaP"
37 
38 # config for mail system
39 DEFAULT_FROM_EMAIL = "webmaster@localhost"
40 REPLY_TO_EMAIL = DEFAULT_FROM_EMAIL
41 if DEBUG:
42     EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
43 
44 # key authentication settings
45 LOGIN_KEY_VALIDITY = 210 # days, so roughly 7 months
46 
47 # minimum answers needed for publishing
48 MIN_ANSWER_COUNT = 2
49 MIN_ANSWER_PERCENTAGE = 0.2
50 
51 # a warning is shown next to results where less than this percentage of the median number of answers (for this question in this course) were given
52 RESULTS_WARNING_PERCENTAGE = 0.5
53 
54 # the final total grade will be calculated by the following formula (GP = GRADE_PERCENTAGE, CP = CONTRIBUTION_PERCENTAGE):
55 # final_likert = CP * likert_answers_about_persons + (1-CP) * likert_answers_about_courses
56 # final_grade = CP * grade_answers_about_persons + (1-CP) * grade_answers_about_courses
57 # final = GP * final_grade + (1-GP) * final_likert
58 GRADE_PERCENTAGE = 0.8
59 CONTRIBUTION_PERCENTAGE = 0.5
60 
61 # days before end date to send reminder
62 REMIND_X_DAYS_AHEAD_OF_END_DATE = 2
63 
64 # email domains for the internal users of the hosting institution used to
65 # figure out who can login with username and password and who needs a login key
66 INSTITUTION_EMAIL_DOMAINS = ["hpi.uni-potsdam.de", "student.hpi.uni-potsdam.de"]
67 
68 # Local time zone for this installation. Choices can be found here:
69 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
70 # although not all choices may be available on all operating systems.
71 # On Unix systems, a value of None will cause Django to use the same
72 # timezone as the operating system.
73 # If running in a Windows environment this must be set to the same as your
74 # system time zone.
75 TIME_ZONE = 'Europe/Berlin'
76 
77 # Language code for this installation. All choices can be found here:
78 # http://www.i18nguy.com/unicode/language-identifiers.html
79 LANGUAGE_CODE = 'en'
80 
81 LANGUAGES = (
82     ('en', "English"),
83     ('de', "Deutsch"),
84 )
85 
86 SITE_ID = 1
87 
88 # If you set this to False, Django will make some optimizations so as not
89 # to load the internationalization machinery.
90 USE_I18N = True
91 
92 # If you set this to False, Django will not format dates, numbers and
93 # calendars according to the current locale
94 USE_L10N = True
95 
96 # Additional locations of fixture files
97 FIXTURE_DIRS = (
98     os.path.join(SITE_ROOT, "evaluation/fixtures"),
99 )
100 
101 # Locale paths
102 LOCALE_PATHS = (
103     os.path.join(SITE_ROOT, "locale"),
104 )
105 
106 # Absolute filesystem path to the directory that will hold user-uploaded files.
107 # Example: "/home/media/media.lawrence.com/media/"
108 MEDIA_ROOT = os.path.join(SITE_ROOT, "upload")
109 
110 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
111 # trailing slash.
112 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
113 MEDIA_URL = '/media/'
114 
115 # Absolute path to the directory static files should be collected to.
116 # Don't put anything in this directory yourself; store your static files
117 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
118 # Example: "/home/media/media.lawrence.com/static/"
119 STATIC_ROOT = os.path.join(SITE_ROOT, "staticfiles")
120 
121 # URL prefix for static files.
122 # Example: "http://media.lawrence.com/static/"
123 STATIC_URL = '/static/'
124 
125 # URL prefix for admin static files -- CSS, JavaScript and images.
126 # Make sure to use a trailing slash.
127 # Examples: "http://foo.com/static/admin/", "/static/admin/".
128 ADMIN_MEDIA_PREFIX = '/static/admin/'
129 
130 # Additional locations of static files
131 STATICFILES_DIRS = (
132     # Put strings here, like "/home/html/static" or "C:/www/django/static".
133     # Always use forward slashes, even on Windows.
134     # Don't forget to use absolute paths, not relative paths.
135     os.path.join(SITE_ROOT, "static"),
136 )
137 
138 # List of finder classes that know how to find static files in
139 # various locations.
140 STATICFILES_FINDERS = (
141     'django.contrib.staticfiles.finders.FileSystemFinder',
142     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
143 #    'django.contrib.staticfiles.finders.DefaultStorageFinder',
144 )
145 
146 # Make this unique, and don't share it with anybody.
147 SECRET_KEY = 'k9-)vh3c_dtm6bpi7j(!*s_^91v0!ekjt_#o&0i$e22tnn^-vb'
148 
149 # List of callables that know how to import templates from various sources.
150 TEMPLATE_LOADERS = (
151     'django.template.loaders.filesystem.Loader',
152     'django.template.loaders.app_directories.Loader',
153 #     'django.template.loaders.eggs.Loader',
154 )
155 
156 TEMPLATE_CONTEXT_PROCESSORS = (
157     "django.contrib.auth.context_processors.auth",
158     "django.core.context_processors.debug",
159     "django.core.context_processors.i18n",
160     "django.core.context_processors.media",
161     "django.core.context_processors.static",
162     "django.core.context_processors.request",
163     "django.contrib.messages.context_processors.messages",
164 )
165 
166 MIDDLEWARE_CLASSES = (
167     'django.middleware.common.CommonMiddleware',
168     'django.contrib.sessions.middleware.SessionMiddleware',
169     'django.middleware.locale.LocaleMiddleware',
170     'django.middleware.csrf.CsrfViewMiddleware',
171     'django.contrib.auth.middleware.AuthenticationMiddleware',
172     'django.contrib.messages.middleware.MessageMiddleware',
173     'evap.evaluation.auth.RequestAuthMiddleware',
174     'evap.evaluation.403.Django403Middleware',
175 )
176 
177 AUTHENTICATION_BACKENDS = (
178     'evap.evaluation.auth.RequestAuthUserBackend',
179 #   'django_auth_kerberos.backends.KrbBackend',
180     'django.contrib.auth.backends.ModelBackend',
181 )
182 
183 # kerberos realm and service
184 #KRB5_REALM = 'EXAMPLE.COM'
185 #KRB5_SERVICE = 'krbtgt@AS.EXAMPLE.COM'
186 
187 # redirect url after login
188 LOGIN_REDIRECT_URL = '/'
189 
190 LOGIN_URL = "/"
191 
192 ROOT_URLCONF = 'evap.urls'
193 
194 TEMPLATE_DIRS = (
195     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
196     # Always use forward slashes, even on Windows.
197     # Don't forget to use absolute paths, not relative paths.
198     os.path.join(SITE_ROOT, "templates"),
199 )
200 
201 INSTALLED_APPS = (
202     'django.contrib.auth',
203     'django.contrib.contenttypes',
204     'django.contrib.sessions',
205     'django.contrib.sites',
206     'django.contrib.messages',
207     'django.contrib.staticfiles',
208     'django.contrib.admin',
209     'south',
210     'widget_tweaks',
211     'evap.evaluation',
212     'evap.fsr',
213     'evap.results',
214     'evap.student',
215     'evap.contributor',
216 #   'django_auth_kerberos',
217 )
218 
219 # A sample logging configuration. The only tangible logging
220 # performed by this configuration is to send an email to
221 # the site admins on every HTTP 500 error.
222 # See http://docs.djangoproject.com/en/dev/topics/logging for
223 # more details on how to customize your logging configuration.
224 LOGGING = {
225     'version': 1,
226     'disable_existing_loggers': False,
227     'filters': {
228          'require_debug_false': {
229              '()': 'django.utils.log.RequireDebugFalse'
230          }
231      },
232     'handlers': {
233         'mail_admins': {
234             'level': 'ERROR',
235             'filters': ['require_debug_false'],
236             'class': 'django.utils.log.AdminEmailHandler'
237         },
238         'console': {
239             'level': 'INFO',
240             'class': 'logging.StreamHandler'
241         }
242     },
243     'loggers': {
244         'django.request': {
245             'handlers': ['mail_admins'],
246             'level': 'ERROR',
247             'propagate': True,
248         },
249         'evap.evaluation.management.commands.import_evaj': {
250             'handlers': ['console'],
251             'level': 'INFO'
252         }
253     }
254 }
255 
256 # Create a localsettings.py if you want to override settings per machine
257 # or user, e.g. for development or different settings in deployments using
258 # multiple servers.
259 _LOCAL_SETTINGS_FILENAME = os.path.join(SITE_ROOT, "localsettings.py")
260 if os.path.exists(_LOCAL_SETTINGS_FILENAME):
261     execfile(_LOCAL_SETTINGS_FILENAME)
262 del _LOCAL_SETTINGS_FILENAME
263
```
--- 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/evap/settings.py b/evap/settings.py
--- a/evap/settings.py
+++ b/evap/settings.py
@@ -253,6 +253,18 @@
     }
 }
 
+#django debug toolbar settings
+ENABLE_DEBUG_TOOLBAR = False
+if DEBUG and ENABLE_DEBUG_TOOLBAR:
+    DEBUG_TOOLBAR_PATCH_SETTINGS = False
+    INSTALLED_APPS += ('debug_toolbar',)
+    MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES
+    def show_toolbar(request):
+        return True
+    DEBUG_TOOLBAR_CONFIG = {
+        'SHOW_TOOLBAR_CALLBACK': 'evap.settings.show_toolbar',
+    }
+
 # Create a localsettings.py if you want to override settings per machine
 # or user, e.g. for development or different settings in deployments using
 # multiple servers.
diff --git a/evap/urls.py b/evap/urls.py
--- a/evap/urls.py
+++ b/evap/urls.py
@@ -23,3 +23,9 @@
     urlpatterns += patterns('',
         url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    )
+
+if settings.DEBUG and settings.ENABLE_DEBUG_TOOLBAR:
+    import debug_toolbar
+    urlpatterns += patterns('',
+        url(r'^__debug__/', include(debug_toolbar.urls)),
+    )

{"golden_diff": "diff --git a/evap/settings.py b/evap/settings.py\n--- a/evap/settings.py\n+++ b/evap/settings.py\n@@ -253,6 +253,18 @@\n     }\n }\n \n+#django debug toolbar settings\n+ENABLE_DEBUG_TOOLBAR = False\n+if DEBUG and ENABLE_DEBUG_TOOLBAR:\n+    DEBUG_TOOLBAR_PATCH_SETTINGS = False\n+    INSTALLED_APPS += ('debug_toolbar',)\n+    MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES\n+    def show_toolbar(request):\n+        return True\n+    DEBUG_TOOLBAR_CONFIG = {\n+        'SHOW_TOOLBAR_CALLBACK': 'evap.settings.show_toolbar',\n+    }\n+\n # Create a localsettings.py if you want to override settings per machine\n # or user, e.g. for development or different settings in deployments using\n # multiple servers.\ndiff --git a/evap/urls.py b/evap/urls.py\n--- a/evap/urls.py\n+++ b/evap/urls.py\n@@ -23,3 +23,9 @@\n     urlpatterns += patterns('',\n         url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),\n    )\n+\n+if settings.DEBUG and settings.ENABLE_DEBUG_TOOLBAR:\n+    import debug_toolbar\n+    urlpatterns += patterns('',\n+        url(r'^__debug__/', include(debug_toolbar.urls)),\n+    )\n", "issue": "include the debug toolbar\nwe should include the debug toolbar so it shows up whenever debug mode is enabled. all pages with lots of sql statements will take about 3x the time to load, but the issue is not the toolbar, but the number of queries then :)\n\n", "before_files": [{"content": "from django.conf import settings\nfrom django.conf.urls import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n    url(r\"^$\", 'evap.evaluation.views.index'),\n    url(r\"^faq$\", 'evap.evaluation.views.faq'),\n    url(r\"^logout$\", 'django.contrib.auth.views.logout', {'next_page': \"/\"}),\n\n    url(r\"^fsr/\", include('evap.fsr.urls')),\n    url(r\"^results/\", include('evap.results.urls')),\n    url(r\"^student/\", include('evap.student.urls')),\n    url(r\"^contributor/\", include('evap.contributor.urls')),\n\n    url(r'^i18n/', include('django.conf.urls.i18n')),\n    url(r\"^admin/\", include(admin.site.urls)),\n)\n\nif settings.DEBUG:\n    urlpatterns += patterns('',\n        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),\n   )\n", "path": "evap/urls.py"}, {"content": "# Django settings for evap project.\n\n# automatically determine SITE_ROOT, used for absolute paths below\nimport os.path\nSITE_ROOT = os.path.dirname(os.path.realpath(__file__))\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nADMINS = (\n    # ('Your Name', 'your_email@example.com'),\n)\n\nMANAGERS = ADMINS\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n        'NAME': os.path.join(SITE_ROOT, 'database.sqlite3'), # Or path to database file if using sqlite3.\n        'USER': '',                             # Not used with sqlite3.\n        'PASSWORD': '',                         # Not used with sqlite3.\n        'HOST': '',                             # Set to empty string for localhost. Not used with sqlite3.\n        'PORT': '',                             # Set to empty string for default. Not used with sqlite3.\n    }\n}\n\nCACHES = {\n    'default': {\n    #    'BACKEND': 'django.core.cache.backends.dummy.DummyCache',\n        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',\n    }\n}\n\n# config for feedback links\nFEEDBACK_EMAIL = \"webmaster@localhost\"\nTRACKER_URL = \"https://github.com/fsr-itse/EvaP\"\n\n# config for mail system\nDEFAULT_FROM_EMAIL = \"webmaster@localhost\"\nREPLY_TO_EMAIL = DEFAULT_FROM_EMAIL\nif DEBUG:\n    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\n\n# key authentication settings\nLOGIN_KEY_VALIDITY = 210 # days, so roughly 7 months\n\n# minimum answers needed for publishing\nMIN_ANSWER_COUNT = 2\nMIN_ANSWER_PERCENTAGE = 0.2\n\n# a warning is shown next to results where less than this percentage of the median number of answers (for this question in this course) were given\nRESULTS_WARNING_PERCENTAGE = 0.5\n\n# the final total grade will be calculated by the following formula (GP = GRADE_PERCENTAGE, CP = CONTRIBUTION_PERCENTAGE):\n# final_likert = CP * likert_answers_about_persons + (1-CP) * likert_answers_about_courses\n# final_grade = CP * grade_answers_about_persons + (1-CP) * grade_answers_about_courses\n# final = GP * final_grade + (1-GP) * final_likert\nGRADE_PERCENTAGE = 0.8\nCONTRIBUTION_PERCENTAGE = 0.5\n\n# days before end date to send reminder\nREMIND_X_DAYS_AHEAD_OF_END_DATE = 2\n\n# email domains for the internal users of the hosting institution used to\n# figure out who can login with username and password and who needs a login key\nINSTITUTION_EMAIL_DOMAINS = [\"hpi.uni-potsdam.de\", \"student.hpi.uni-potsdam.de\"]\n\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# On Unix systems, a value of None will cause Django to use the same\n# timezone as the operating system.\n# If running in a Windows environment this must be set to the same as your\n# system time zone.\nTIME_ZONE = 'Europe/Berlin'\n\n# Language code for this installation. All choices can be found here:\n# http://www.i18nguy.com/unicode/language-identifiers.html\nLANGUAGE_CODE = 'en'\n\nLANGUAGES = (\n    ('en', \"English\"),\n    ('de', \"Deutsch\"),\n)\n\nSITE_ID = 1\n\n# If you set this to False, Django will make some optimizations so as not\n# to load the internationalization machinery.\nUSE_I18N = True\n\n# If you set this to False, Django will not format dates, numbers and\n# calendars according to the current locale\nUSE_L10N = True\n\n# Additional locations of fixture files\nFIXTURE_DIRS = (\n    os.path.join(SITE_ROOT, \"evaluation/fixtures\"),\n)\n\n# Locale paths\nLOCALE_PATHS = (\n    os.path.join(SITE_ROOT, \"locale\"),\n)\n\n# Absolute filesystem path to the directory that will hold user-uploaded files.\n# Example: \"/home/media/media.lawrence.com/media/\"\nMEDIA_ROOT = os.path.join(SITE_ROOT, \"upload\")\n\n# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n# trailing slash.\n# Examples: \"http://media.lawrence.com/media/\", \"http://example.com/media/\"\nMEDIA_URL = '/media/'\n\n# Absolute path to the directory static files should be collected to.\n# Don't put anything in this directory yourself; store your static files\n# in apps' \"static/\" subdirectories and in STATICFILES_DIRS.\n# Example: \"/home/media/media.lawrence.com/static/\"\nSTATIC_ROOT = os.path.join(SITE_ROOT, \"staticfiles\")\n\n# URL prefix for static files.\n# Example: \"http://media.lawrence.com/static/\"\nSTATIC_URL = '/static/'\n\n# URL prefix for admin static files -- CSS, JavaScript and images.\n# Make sure to use a trailing slash.\n# Examples: \"http://foo.com/static/admin/\", \"/static/admin/\".\nADMIN_MEDIA_PREFIX = '/static/admin/'\n\n# Additional locations of static files\nSTATICFILES_DIRS = (\n    # Put strings here, like \"/home/html/static\" or \"C:/www/django/static\".\n    # Always use forward slashes, even on Windows.\n    # Don't forget to use absolute paths, not relative paths.\n    os.path.join(SITE_ROOT, \"static\"),\n)\n\n# List of finder classes that know how to find static files in\n# various locations.\nSTATICFILES_FINDERS = (\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n#    'django.contrib.staticfiles.finders.DefaultStorageFinder',\n)\n\n# Make this unique, and don't share it with anybody.\nSECRET_KEY = 'k9-)vh3c_dtm6bpi7j(!*s_^91v0!ekjt_#o&0i$e22tnn^-vb'\n\n# List of callables that know how to import templates from various sources.\nTEMPLATE_LOADERS = (\n    'django.template.loaders.filesystem.Loader',\n    'django.template.loaders.app_directories.Loader',\n#     'django.template.loaders.eggs.Loader',\n)\n\nTEMPLATE_CONTEXT_PROCESSORS = (\n    \"django.contrib.auth.context_processors.auth\",\n    \"django.core.context_processors.debug\",\n    \"django.core.context_processors.i18n\",\n    \"django.core.context_processors.media\",\n    \"django.core.context_processors.static\",\n    \"django.core.context_processors.request\",\n    \"django.contrib.messages.context_processors.messages\",\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.middleware.common.CommonMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.locale.LocaleMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'evap.evaluation.auth.RequestAuthMiddleware',\n    'evap.evaluation.403.Django403Middleware',\n)\n\nAUTHENTICATION_BACKENDS = (\n    'evap.evaluation.auth.RequestAuthUserBackend',\n#   'django_auth_kerberos.backends.KrbBackend',\n    'django.contrib.auth.backends.ModelBackend',\n)\n\n# kerberos realm and service\n#KRB5_REALM = 'EXAMPLE.COM'\n#KRB5_SERVICE = 'krbtgt@AS.EXAMPLE.COM'\n\n# redirect url after login\nLOGIN_REDIRECT_URL = '/'\n\nLOGIN_URL = \"/\"\n\nROOT_URLCONF = 'evap.urls'\n\nTEMPLATE_DIRS = (\n    # Put strings here, like \"/home/html/django_templates\" or \"C:/www/django/templates\".\n    # Always use forward slashes, even on Windows.\n    # Don't forget to use absolute paths, not relative paths.\n    os.path.join(SITE_ROOT, \"templates\"),\n)\n\nINSTALLED_APPS = (\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.sites',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'django.contrib.admin',\n    'south',\n    'widget_tweaks',\n    'evap.evaluation',\n    'evap.fsr',\n    'evap.results',\n    'evap.student',\n    'evap.contributor',\n#   'django_auth_kerberos',\n)\n\n# A sample logging configuration. The only tangible logging\n# performed by this configuration is to send an email to\n# the site admins on every HTTP 500 error.\n# See http://docs.djangoproject.com/en/dev/topics/logging for\n# more details on how to customize your logging configuration.\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'filters': {\n         'require_debug_false': {\n             '()': 'django.utils.log.RequireDebugFalse'\n         }\n     },\n    'handlers': {\n        'mail_admins': {\n            'level': 'ERROR',\n            'filters': ['require_debug_false'],\n            'class': 'django.utils.log.AdminEmailHandler'\n        },\n        'console': {\n            'level': 'INFO',\n            'class': 'logging.StreamHandler'\n        }\n    },\n    'loggers': {\n        'django.request': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': True,\n        },\n        'evap.evaluation.management.commands.import_evaj': {\n            'handlers': ['console'],\n            'level': 'INFO'\n        }\n    }\n}\n\n# Create a localsettings.py if you want to override settings per machine\n# or user, e.g. for development or different settings in deployments using\n# multiple servers.\n_LOCAL_SETTINGS_FILENAME = os.path.join(SITE_ROOT, \"localsettings.py\")\nif os.path.exists(_LOCAL_SETTINGS_FILENAME):\n    execfile(_LOCAL_SETTINGS_FILENAME)\ndel _LOCAL_SETTINGS_FILENAME\n", "path": "evap/settings.py"}], "after_files": [{"content": "from django.conf import settings\nfrom django.conf.urls import patterns, include, url\n\n# Uncomment the next two lines to enable the admin:\nfrom django.contrib import admin\nadmin.autodiscover()\n\nurlpatterns = patterns('',\n    url(r\"^$\", 'evap.evaluation.views.index'),\n    url(r\"^faq$\", 'evap.evaluation.views.faq'),\n    url(r\"^logout$\", 'django.contrib.auth.views.logout', {'next_page': \"/\"}),\n\n    url(r\"^fsr/\", include('evap.fsr.urls')),\n    url(r\"^results/\", include('evap.results.urls')),\n    url(r\"^student/\", include('evap.student.urls')),\n    url(r\"^contributor/\", include('evap.contributor.urls')),\n\n    url(r'^i18n/', include('django.conf.urls.i18n')),\n    url(r\"^admin/\", include(admin.site.urls)),\n)\n\nif settings.DEBUG:\n    urlpatterns += patterns('',\n        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),\n   )\n\nif settings.DEBUG and settings.ENABLE_DEBUG_TOOLBAR:\n    import debug_toolbar\n    urlpatterns += patterns('',\n        url(r'^__debug__/', include(debug_toolbar.urls)),\n    )\n", "path": "evap/urls.py"}, {"content": "# Django settings for evap project.\n\n# automatically determine SITE_ROOT, used for absolute paths below\nimport os.path\nSITE_ROOT = os.path.dirname(os.path.realpath(__file__))\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n\nADMINS = (\n    # ('Your Name', 'your_email@example.com'),\n)\n\nMANAGERS = ADMINS\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n        'NAME': os.path.join(SITE_ROOT, 'database.sqlite3'), # Or path to database file if using sqlite3.\n        'USER': '',                             # Not used with sqlite3.\n        'PASSWORD': '',                         # Not used with sqlite3.\n        'HOST': '',                             # Set to empty string for localhost. Not used with sqlite3.\n        'PORT': '',                             # Set to empty string for default. Not used with sqlite3.\n    }\n}\n\nCACHES = {\n    'default': {\n    #    'BACKEND': 'django.core.cache.backends.dummy.DummyCache',\n        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',\n    }\n}\n\n# config for feedback links\nFEEDBACK_EMAIL = \"webmaster@localhost\"\nTRACKER_URL = \"https://github.com/fsr-itse/EvaP\"\n\n# config for mail system\nDEFAULT_FROM_EMAIL = \"webmaster@localhost\"\nREPLY_TO_EMAIL = DEFAULT_FROM_EMAIL\nif DEBUG:\n    EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\n\n# key authentication settings\nLOGIN_KEY_VALIDITY = 210 # days, so roughly 7 months\n\n# minimum answers needed for publishing\nMIN_ANSWER_COUNT = 2\nMIN_ANSWER_PERCENTAGE = 0.2\n\n# a warning is shown next to results where less than this percentage of the median number of answers (for this question in this course) were given\nRESULTS_WARNING_PERCENTAGE = 0.5\n\n# the final total grade will be calculated by the following formula (GP = GRADE_PERCENTAGE, CP = CONTRIBUTION_PERCENTAGE):\n# final_likert = CP * likert_answers_about_persons + (1-CP) * likert_answers_about_courses\n# final_grade = CP * grade_answers_about_persons + (1-CP) * grade_answers_about_courses\n# final = GP * final_grade + (1-GP) * final_likert\nGRADE_PERCENTAGE = 0.8\nCONTRIBUTION_PERCENTAGE = 0.5\n\n# days before end date to send reminder\nREMIND_X_DAYS_AHEAD_OF_END_DATE = 2\n\n# email domains for the internal users of the hosting institution used to\n# figure out who can login with username and password and who needs a login key\nINSTITUTION_EMAIL_DOMAINS = [\"hpi.uni-potsdam.de\", \"student.hpi.uni-potsdam.de\"]\n\n# Local time zone for this installation. Choices can be found here:\n# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n# although not all choices may be available on all operating systems.\n# On Unix systems, a value of None will cause Django to use the same\n# timezone as the operating system.\n# If running in a Windows environment this must be set to the same as your\n# system time zone.\nTIME_ZONE = 'Europe/Berlin'\n\n# Language code for this installation. All choices can be found here:\n# http://www.i18nguy.com/unicode/language-identifiers.html\nLANGUAGE_CODE = 'en'\n\nLANGUAGES = (\n    ('en', \"English\"),\n    ('de', \"Deutsch\"),\n)\n\nSITE_ID = 1\n\n# If you set this to False, Django will make some optimizations so as not\n# to load the internationalization machinery.\nUSE_I18N = True\n\n# If you set this to False, Django will not format dates, numbers and\n# calendars according to the current locale\nUSE_L10N = True\n\n# Additional locations of fixture files\nFIXTURE_DIRS = (\n    os.path.join(SITE_ROOT, \"evaluation/fixtures\"),\n)\n\n# Locale paths\nLOCALE_PATHS = (\n    os.path.join(SITE_ROOT, \"locale\"),\n)\n\n# Absolute filesystem path to the directory that will hold user-uploaded files.\n# Example: \"/home/media/media.lawrence.com/media/\"\nMEDIA_ROOT = os.path.join(SITE_ROOT, \"upload\")\n\n# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n# trailing slash.\n# Examples: \"http://media.lawrence.com/media/\", \"http://example.com/media/\"\nMEDIA_URL = '/media/'\n\n# Absolute path to the directory static files should be collected to.\n# Don't put anything in this directory yourself; store your static files\n# in apps' \"static/\" subdirectories and in STATICFILES_DIRS.\n# Example: \"/home/media/media.lawrence.com/static/\"\nSTATIC_ROOT = os.path.join(SITE_ROOT, \"staticfiles\")\n\n# URL prefix for static files.\n# Example: \"http://media.lawrence.com/static/\"\nSTATIC_URL = '/static/'\n\n# URL prefix for admin static files -- CSS, JavaScript and images.\n# Make sure to use a trailing slash.\n# Examples: \"http://foo.com/static/admin/\", \"/static/admin/\".\nADMIN_MEDIA_PREFIX = '/static/admin/'\n\n# Additional locations of static files\nSTATICFILES_DIRS = (\n    # Put strings here, like \"/home/html/static\" or \"C:/www/django/static\".\n    # Always use forward slashes, even on Windows.\n    # Don't forget to use absolute paths, not relative paths.\n    os.path.join(SITE_ROOT, \"static\"),\n)\n\n# List of finder classes that know how to find static files in\n# various locations.\nSTATICFILES_FINDERS = (\n    'django.contrib.staticfiles.finders.FileSystemFinder',\n    'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n#    'django.contrib.staticfiles.finders.DefaultStorageFinder',\n)\n\n# Make this unique, and don't share it with anybody.\nSECRET_KEY = 'k9-)vh3c_dtm6bpi7j(!*s_^91v0!ekjt_#o&0i$e22tnn^-vb'\n\n# List of callables that know how to import templates from various sources.\nTEMPLATE_LOADERS = (\n    'django.template.loaders.filesystem.Loader',\n    'django.template.loaders.app_directories.Loader',\n#     'django.template.loaders.eggs.Loader',\n)\n\nTEMPLATE_CONTEXT_PROCESSORS = (\n    \"django.contrib.auth.context_processors.auth\",\n    \"django.core.context_processors.debug\",\n    \"django.core.context_processors.i18n\",\n    \"django.core.context_processors.media\",\n    \"django.core.context_processors.static\",\n    \"django.core.context_processors.request\",\n    \"django.contrib.messages.context_processors.messages\",\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.middleware.common.CommonMiddleware',\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.locale.LocaleMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'evap.evaluation.auth.RequestAuthMiddleware',\n    'evap.evaluation.403.Django403Middleware',\n)\n\nAUTHENTICATION_BACKENDS = (\n    'evap.evaluation.auth.RequestAuthUserBackend',\n#   'django_auth_kerberos.backends.KrbBackend',\n    'django.contrib.auth.backends.ModelBackend',\n)\n\n# kerberos realm and service\n#KRB5_REALM = 'EXAMPLE.COM'\n#KRB5_SERVICE = 'krbtgt@AS.EXAMPLE.COM'\n\n# redirect url after login\nLOGIN_REDIRECT_URL = '/'\n\nLOGIN_URL = \"/\"\n\nROOT_URLCONF = 'evap.urls'\n\nTEMPLATE_DIRS = (\n    # Put strings here, like \"/home/html/django_templates\" or \"C:/www/django/templates\".\n    # Always use forward slashes, even on Windows.\n    # Don't forget to use absolute paths, not relative paths.\n    os.path.join(SITE_ROOT, \"templates\"),\n)\n\nINSTALLED_APPS = (\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.sessions',\n    'django.contrib.sites',\n    'django.contrib.messages',\n    'django.contrib.staticfiles',\n    'django.contrib.admin',\n    'south',\n    'widget_tweaks',\n    'evap.evaluation',\n    'evap.fsr',\n    'evap.results',\n    'evap.student',\n    'evap.contributor',\n#   'django_auth_kerberos',\n)\n\n# A sample logging configuration. The only tangible logging\n# performed by this configuration is to send an email to\n# the site admins on every HTTP 500 error.\n# See http://docs.djangoproject.com/en/dev/topics/logging for\n# more details on how to customize your logging configuration.\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'filters': {\n         'require_debug_false': {\n             '()': 'django.utils.log.RequireDebugFalse'\n         }\n     },\n    'handlers': {\n        'mail_admins': {\n            'level': 'ERROR',\n            'filters': ['require_debug_false'],\n            'class': 'django.utils.log.AdminEmailHandler'\n        },\n        'console': {\n            'level': 'INFO',\n            'class': 'logging.StreamHandler'\n        }\n    },\n    'loggers': {\n        'django.request': {\n            'handlers': ['mail_admins'],\n            'level': 'ERROR',\n            'propagate': True,\n        },\n        'evap.evaluation.management.commands.import_evaj': {\n            'handlers': ['console'],\n            'level': 'INFO'\n        }\n    }\n}\n\n#django debug toolbar settings\nENABLE_DEBUG_TOOLBAR = False\nif DEBUG and ENABLE_DEBUG_TOOLBAR:\n    DEBUG_TOOLBAR_PATCH_SETTINGS = False\n    INSTALLED_APPS += ('debug_toolbar',)\n    MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES\n    def show_toolbar(request):\n        return True\n    DEBUG_TOOLBAR_CONFIG = {\n        'SHOW_TOOLBAR_CALLBACK': 'evap.settings.show_toolbar',\n    }\n\n# Create a localsettings.py if you want to override settings per machine\n# or user, e.g. for development or different settings in deployments using\n# multiple servers.\n_LOCAL_SETTINGS_FILENAME = os.path.join(SITE_ROOT, \"localsettings.py\")\nif os.path.exists(_LOCAL_SETTINGS_FILENAME):\n    execfile(_LOCAL_SETTINGS_FILENAME)\ndel _LOCAL_SETTINGS_FILENAME\n", "path": "evap/settings.py"}]}