We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Menu bar hides content
The navigation on top of the page hides parts of the content if its size increases. This happens in smaller browser windows, where the navigation bar has more than one line but is not yet compressed into a single icon.
The content should always be visible.

![capture](https://cloud.githubusercontent.com/assets/1781719/5887235/763386a4-a3c4-11e4-8b93-c2999d8ca74a.PNG)


--- 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/settings.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """
3 Django settings for EvaP project.
4 
5 For more information on this file, see
6 https://docs.djangoproject.com/en/1.7/topics/settings/
7 
8 For the full list of settings and their values, see
9 https://docs.djangoproject.com/en/1.7/ref/settings/
10 """
11 
12 import os
13 import sys
14 from django.contrib.messages import constants as messages
15 
16 BASE_DIR = os.path.dirname(os.path.realpath(__file__))
17 
18 
19 ### Debugging
20 
21 DEBUG = True
22 
23 # Very helpful but eats a lot of performance on sql-heavy pages.
24 # Works only with DEBUG = True and Django's development server (so no apache).
25 ENABLE_DEBUG_TOOLBAR = False
26 
27 
28 ### EvaP logic
29 
30 # key authentication settings
31 LOGIN_KEY_VALIDITY = 210 # days, so roughly 7 months
32 
33 # minimum answers needed for publishing
34 MIN_ANSWER_COUNT = 2
35 MIN_ANSWER_PERCENTAGE = 0.2
36 
37 # 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
38 RESULTS_WARNING_PERCENTAGE = 0.5
39 
40 # the final total grade will be calculated by the following formula (GP = GRADE_PERCENTAGE, CP = CONTRIBUTION_PERCENTAGE):
41 # final_likert = CP * likert_answers_about_persons + (1-CP) * likert_answers_about_courses
42 # final_grade = CP * grade_answers_about_persons + (1-CP) * grade_answers_about_courses
43 # final = GP * final_grade + (1-GP) * final_likert
44 GRADE_PERCENTAGE = 0.8
45 CONTRIBUTION_PERCENTAGE = 0.5
46 
47 # number of reward points to be given to a student once all courses of a semester have been voted for
48 REWARD_POINTS_PER_SEMESTER = 3
49 
50 # days before end date to send reminder
51 REMIND_X_DAYS_AHEAD_OF_END_DATE = [2, 0]
52 
53 # email domains for the internal users of the hosting institution used to
54 # figure out who can login with username and password and who needs a login key
55 INSTITUTION_EMAIL_DOMAINS = ["hpi.uni-potsdam.de", "student.hpi.uni-potsdam.de", "hpi.de", "student.hpi.de"]
56 
57 # maximum length of usernames of internal users
58 INTERNAL_USERNAMES_MAX_LENGTH = 20
59 
60 # the importer accepts only these two strings in the 'graded' column
61 IMPORTER_GRADED_YES = "yes"
62 IMPORTER_GRADED_NO = "no"
63 
64 # the default descriptions for grade documents
65 DEFAULT_FINAL_GRADES_DESCRIPTION = "Final grades"
66 DEFAULT_MIDTERM_GRADES_DESCRIPTION = "Midterm grades"
67 
68 
69 ### Installation specific settings
70 
71 # People who get emails on errors.
72 ADMINS = (
73     # ('Your Name', 'your_email@example.com'),
74 )
75 
76 # localhost is listed for easier development. Remove it in production environments.
77 ALLOWED_HOSTS = ["localhost"]
78 
79 # Make this unique, and don't share it with anybody.
80 SECRET_KEY = 'k9-)vh3c_dtm6bpi7j(!*s_^91v0!ekjt_#o&0i$e22tnn^-vb'
81 
82 DATABASES = {
83     'default': {
84         'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
85         'NAME': os.path.join(BASE_DIR, 'database.sqlite3'), # Or path to database file if using sqlite3.
86         'USER': '',                             # Not used with sqlite3.
87         'PASSWORD': '',                         # Not used with sqlite3.
88         'HOST': '',                             # Set to empty string for localhost. Not used with sqlite3.
89         'PORT': '',                             # Set to empty string for default. Not used with sqlite3.
90         'CONN_MAX_AGE': 600,
91     }
92 }
93 
94 CACHES = {
95     'default': {
96         'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
97         'LOCATION': 'evap_db_cache',
98         'OPTIONS': {
99             'MAX_ENTRIES': 1000 # note that the results alone need one entry per course
100         }
101     }
102 }
103 
104 # Config for feedback links
105 FEEDBACK_EMAIL = "webmaster@localhost"
106 TRACKER_URL = "https://github.com/fsr-itse/EvaP"
107 
108 # Config for mail system
109 DEFAULT_FROM_EMAIL = "webmaster@localhost"
110 REPLY_TO_EMAIL = DEFAULT_FROM_EMAIL
111 if DEBUG:
112     EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
113 
114 # Config for legal notice
115 # The HTML file which should be used must be located in evap\templates\legal_notice_text.html
116 LEGAL_NOTICE_ACTIVE = False
117 
118 
119 LOGGING = {
120     'version': 1,
121     'disable_existing_loggers': False,
122     'formatters': {
123         'default': {
124             'format': '[%(asctime)s] %(levelname)s: %(message)s',
125         },
126     },
127     'handlers': {
128         'file': {
129             'level': 'DEBUG',
130             'class': 'logging.handlers.RotatingFileHandler',
131             'filename': BASE_DIR + '/logs/evap.log',
132             'maxBytes': 1024*1024*10,
133             'backupCount': 5,
134             'formatter': 'default',
135         },
136         'mail_admins': {
137             'level': 'ERROR',
138             'class': 'django.utils.log.AdminEmailHandler',
139         }
140     },
141     'loggers': {
142         'django': {
143             'handlers': ['file'],
144             'level': 'INFO',
145             'propagate': True,
146         },
147         'evap': {
148             'handlers': ['file', 'mail_admins'],
149             'level': 'DEBUG',
150             'propagate': True,
151         },
152     },
153 }
154 
155 
156 ### Application definition
157 
158 AUTH_USER_MODEL = 'evaluation.UserProfile'
159 
160 INSTALLED_APPS = (
161     'django.contrib.admin',
162     'django.contrib.auth',
163     'django.contrib.contenttypes',
164     'django.contrib.sessions',
165     'django.contrib.messages',
166     'django.contrib.staticfiles',
167     'widget_tweaks',
168     'evap.evaluation',
169     'evap.staff',
170     'evap.results',
171     'evap.student',
172     'evap.contributor',
173     'evap.rewards',
174     'evap.grades',
175     'django_extensions',
176 )
177 
178 MIDDLEWARE_CLASSES = (
179     'django.contrib.sessions.middleware.SessionMiddleware',
180     'django.middleware.common.CommonMiddleware',
181     'django.middleware.csrf.CsrfViewMiddleware',
182     'django.contrib.auth.middleware.AuthenticationMiddleware',
183     'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
184     'django.contrib.messages.middleware.MessageMiddleware',
185     'django.middleware.clickjacking.XFrameOptionsMiddleware',
186     'django.middleware.locale.LocaleMiddleware',
187     'evap.evaluation.auth.RequestAuthMiddleware',
188 )
189 
190 TEMPLATES = [
191     {
192         'BACKEND': 'django.template.backends.django.DjangoTemplates',
193         'DIRS': [
194             os.path.join(BASE_DIR, "templates"),
195         ],
196         'APP_DIRS': True,
197         'OPTIONS': {
198             'context_processors': [
199                 "django.contrib.auth.context_processors.auth",
200                 "django.template.context_processors.debug",
201                 "django.template.context_processors.i18n",
202                 "django.template.context_processors.media",
203                 "django.template.context_processors.static",
204                 "django.template.context_processors.request",
205                 "django.contrib.messages.context_processors.messages",
206                 "evap.context_processors.feedback_email",
207                 "evap.context_processors.legal_notice_active",
208                 "evap.context_processors.tracker_url",
209             ],
210         },
211     },
212 ]
213 # enable cached template loader when DEBUG == False
214 if not DEBUG:
215     TEMPLATES[0]['APP_DIRS'] = False
216     TEMPLATES[0]['OPTIONS']['loaders'] = [
217         ('django.template.loaders.cached.Loader', [
218             'django.template.loaders.filesystem.Loader',
219             'django.template.loaders.app_directories.Loader',
220         ]),
221     ]
222 
223 AUTHENTICATION_BACKENDS = (
224     'evap.evaluation.auth.RequestAuthUserBackend',
225     'django.contrib.auth.backends.ModelBackend',
226 )
227 
228 ROOT_URLCONF = 'evap.urls'
229 
230 WSGI_APPLICATION = 'evap.wsgi.application'
231 
232 # Redirect url after login
233 LOGIN_REDIRECT_URL = '/'
234 
235 LOGIN_URL = "/"
236 
237 
238 ### Internationalization
239 
240 LANGUAGE_CODE = 'en'
241 
242 TIME_ZONE = 'Europe/Berlin'
243 
244 USE_I18N = True
245 
246 USE_L10N = True
247 
248 USE_TZ = False
249 
250 LOCALE_PATHS = (
251     os.path.join(BASE_DIR, "locale"),
252 )
253 
254 LANGUAGES = (
255     ('en', "English"),
256     ('de', "Deutsch"),
257 )
258 
259 USERNAME_REPLACEMENTS = [
260     (' ', ''),
261     ('ä', 'ae'),
262     ('ö', 'oe'),
263     ('ü', 'ue'),
264     ('ß', 'ss'),
265 ]
266 
267 
268 ### Static files (CSS, JavaScript, Images)
269 # https://docs.djangoproject.com/en/1.7/howto/static-files/
270 
271 STATIC_URL = '/static/'
272 
273 # Additional locations of static files
274 STATICFILES_DIRS = (
275     os.path.join(BASE_DIR, "static"),
276 )
277 
278 # Absolute path to the directory static files should be collected to.
279 STATIC_ROOT = os.path.join(BASE_DIR, "static_collected")
280 
281 
282 ### User-uploaded files
283 
284 # Absolute filesystem path to the directory that will hold user-uploaded files.
285 MEDIA_ROOT = os.path.join(BASE_DIR, "upload")
286 
287 # URL that handles the media served from MEDIA_ROOT.
288 MEDIA_URL = '/media/'
289 
290 # the backend used for downloading attachments
291 # see https://github.com/johnsensible/django-sendfile for further information
292 SENDFILE_BACKEND = 'sendfile.backends.simple'
293 
294 ### Other
295 
296 # Apply the correct bootstrap css class to django's error messages
297 MESSAGE_TAGS = {
298     messages.ERROR: 'danger',
299 }
300 
301 # make generation of Question objects work, see https://github.com/vandersonmota/model_mommy/issues/231
302 MOMMY_CUSTOM_FIELDS_GEN = {
303     'django.db.models.fields.proxy.OrderWrt': int,
304 }
305 
306 # Create a localsettings.py if you want to locally override settings
307 # and don't want the changes to appear in 'git status'.
308 try:
309     from evap.localsettings import *
310 except ImportError:
311     pass
312 
313 # speed up tests by using sqlite
314 if 'test' in sys.argv:
315     DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}
316 
317 # Django debug toolbar settings
318 TESTING = 'test' in sys.argv
319 if DEBUG and not TESTING and ENABLE_DEBUG_TOOLBAR:
320     DEBUG_TOOLBAR_PATCH_SETTINGS = False
321     INSTALLED_APPS += ('debug_toolbar',)
322     MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES
323     def show_toolbar(request):
324         return True
325     DEBUG_TOOLBAR_CONFIG = {
326         'SHOW_TOOLBAR_CALLBACK': 'evap.settings.show_toolbar',
327     }
328
```
--- 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
@@ -172,6 +172,7 @@
     'evap.contributor',
     'evap.rewards',
     'evap.grades',
+    'compressor',
     'django_extensions',
 )
 
@@ -275,6 +276,12 @@
     os.path.join(BASE_DIR, "static"),
 )
 
+STATICFILES_FINDERS = (
+    "django.contrib.staticfiles.finders.FileSystemFinder",
+    "django.contrib.staticfiles.finders.AppDirectoriesFinder",
+    "compressor.finders.CompressorFinder",
+)
+
 # Absolute path to the directory static files should be collected to.
 STATIC_ROOT = os.path.join(BASE_DIR, "static_collected")
 
@@ -291,8 +298,17 @@
 # see https://github.com/johnsensible/django-sendfile for further information
 SENDFILE_BACKEND = 'sendfile.backends.simple'
 
+
 ### Other
 
+# django-compressor settings
+COMPRESS_ENABLED = not DEBUG
+COMPRESS_OFFLINE = False
+COMPRESS_PRECOMPILERS = (
+    ('text/less', 'lessc {infile} {outfile}'),
+)
+COMPRESS_CACHEABLE_PRECOMPILERS = ('text/less',)
+
 # Apply the correct bootstrap css class to django's error messages
 MESSAGE_TAGS = {
     messages.ERROR: 'danger',

{"golden_diff": "diff --git a/evap/settings.py b/evap/settings.py\n--- a/evap/settings.py\n+++ b/evap/settings.py\n@@ -172,6 +172,7 @@\n     'evap.contributor',\n     'evap.rewards',\n     'evap.grades',\n+    'compressor',\n     'django_extensions',\n )\n \n@@ -275,6 +276,12 @@\n     os.path.join(BASE_DIR, \"static\"),\n )\n \n+STATICFILES_FINDERS = (\n+    \"django.contrib.staticfiles.finders.FileSystemFinder\",\n+    \"django.contrib.staticfiles.finders.AppDirectoriesFinder\",\n+    \"compressor.finders.CompressorFinder\",\n+)\n+\n # Absolute path to the directory static files should be collected to.\n STATIC_ROOT = os.path.join(BASE_DIR, \"static_collected\")\n \n@@ -291,8 +298,17 @@\n # see https://github.com/johnsensible/django-sendfile for further information\n SENDFILE_BACKEND = 'sendfile.backends.simple'\n \n+\n ### Other\n \n+# django-compressor settings\n+COMPRESS_ENABLED = not DEBUG\n+COMPRESS_OFFLINE = False\n+COMPRESS_PRECOMPILERS = (\n+    ('text/less', 'lessc {infile} {outfile}'),\n+)\n+COMPRESS_CACHEABLE_PRECOMPILERS = ('text/less',)\n+\n # Apply the correct bootstrap css class to django's error messages\n MESSAGE_TAGS = {\n     messages.ERROR: 'danger',\n", "issue": "Menu bar hides content\nThe navigation on top of the page hides parts of the content if its size increases. This happens in smaller browser windows, where the navigation bar has more than one line but is not yet compressed into a single icon.\nThe content should always be visible.\n\n![capture](https://cloud.githubusercontent.com/assets/1781719/5887235/763386a4-a3c4-11e4-8b93-c2999d8ca74a.PNG)\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDjango settings for EvaP project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.7/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.7/ref/settings/\n\"\"\"\n\nimport os\nimport sys\nfrom django.contrib.messages import constants as messages\n\nBASE_DIR = os.path.dirname(os.path.realpath(__file__))\n\n\n### Debugging\n\nDEBUG = True\n\n# Very helpful but eats a lot of performance on sql-heavy pages.\n# Works only with DEBUG = True and Django's development server (so no apache).\nENABLE_DEBUG_TOOLBAR = False\n\n\n### EvaP logic\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# number of reward points to be given to a student once all courses of a semester have been voted for\nREWARD_POINTS_PER_SEMESTER = 3\n\n# days before end date to send reminder\nREMIND_X_DAYS_AHEAD_OF_END_DATE = [2, 0]\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\", \"hpi.de\", \"student.hpi.de\"]\n\n# maximum length of usernames of internal users\nINTERNAL_USERNAMES_MAX_LENGTH = 20\n\n# the importer accepts only these two strings in the 'graded' column\nIMPORTER_GRADED_YES = \"yes\"\nIMPORTER_GRADED_NO = \"no\"\n\n# the default descriptions for grade documents\nDEFAULT_FINAL_GRADES_DESCRIPTION = \"Final grades\"\nDEFAULT_MIDTERM_GRADES_DESCRIPTION = \"Midterm grades\"\n\n\n### Installation specific settings\n\n# People who get emails on errors.\nADMINS = (\n    # ('Your Name', 'your_email@example.com'),\n)\n\n# localhost is listed for easier development. Remove it in production environments.\nALLOWED_HOSTS = [\"localhost\"]\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\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n        'NAME': os.path.join(BASE_DIR, '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        'CONN_MAX_AGE': 600,\n    }\n}\n\nCACHES = {\n    'default': {\n        'BACKEND': 'django.core.cache.backends.db.DatabaseCache',\n        'LOCATION': 'evap_db_cache',\n        'OPTIONS': {\n            'MAX_ENTRIES': 1000 # note that the results alone need one entry per course\n        }\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# Config for legal notice\n# The HTML file which should be used must be located in evap\\templates\\legal_notice_text.html\nLEGAL_NOTICE_ACTIVE = False\n\n\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'formatters': {\n        'default': {\n            'format': '[%(asctime)s] %(levelname)s: %(message)s',\n        },\n    },\n    'handlers': {\n        'file': {\n            'level': 'DEBUG',\n            'class': 'logging.handlers.RotatingFileHandler',\n            'filename': BASE_DIR + '/logs/evap.log',\n            'maxBytes': 1024*1024*10,\n            'backupCount': 5,\n            'formatter': 'default',\n        },\n        'mail_admins': {\n            'level': 'ERROR',\n            'class': 'django.utils.log.AdminEmailHandler',\n        }\n    },\n    'loggers': {\n        'django': {\n            'handlers': ['file'],\n            'level': 'INFO',\n            'propagate': True,\n        },\n        'evap': {\n            'handlers': ['file', 'mail_admins'],\n            'level': 'DEBUG',\n            'propagate': True,\n        },\n    },\n}\n\n\n### Application definition\n\nAUTH_USER_MODEL = 'evaluation.UserProfile'\n\nINSTALLED_APPS = (\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    'widget_tweaks',\n    'evap.evaluation',\n    'evap.staff',\n    'evap.results',\n    'evap.student',\n    'evap.contributor',\n    'evap.rewards',\n    'evap.grades',\n    'django_extensions',\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n    'django.middleware.locale.LocaleMiddleware',\n    'evap.evaluation.auth.RequestAuthMiddleware',\n)\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [\n            os.path.join(BASE_DIR, \"templates\"),\n        ],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                \"django.contrib.auth.context_processors.auth\",\n                \"django.template.context_processors.debug\",\n                \"django.template.context_processors.i18n\",\n                \"django.template.context_processors.media\",\n                \"django.template.context_processors.static\",\n                \"django.template.context_processors.request\",\n                \"django.contrib.messages.context_processors.messages\",\n                \"evap.context_processors.feedback_email\",\n                \"evap.context_processors.legal_notice_active\",\n                \"evap.context_processors.tracker_url\",\n            ],\n        },\n    },\n]\n# enable cached template loader when DEBUG == False\nif not DEBUG:\n    TEMPLATES[0]['APP_DIRS'] = False\n    TEMPLATES[0]['OPTIONS']['loaders'] = [\n        ('django.template.loaders.cached.Loader', [\n            'django.template.loaders.filesystem.Loader',\n            'django.template.loaders.app_directories.Loader',\n        ]),\n    ]\n\nAUTHENTICATION_BACKENDS = (\n    'evap.evaluation.auth.RequestAuthUserBackend',\n    'django.contrib.auth.backends.ModelBackend',\n)\n\nROOT_URLCONF = 'evap.urls'\n\nWSGI_APPLICATION = 'evap.wsgi.application'\n\n# Redirect url after login\nLOGIN_REDIRECT_URL = '/'\n\nLOGIN_URL = \"/\"\n\n\n### Internationalization\n\nLANGUAGE_CODE = 'en'\n\nTIME_ZONE = 'Europe/Berlin'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = False\n\nLOCALE_PATHS = (\n    os.path.join(BASE_DIR, \"locale\"),\n)\n\nLANGUAGES = (\n    ('en', \"English\"),\n    ('de', \"Deutsch\"),\n)\n\nUSERNAME_REPLACEMENTS = [\n    (' ', ''),\n    ('\u00e4', 'ae'),\n    ('\u00f6', 'oe'),\n    ('\u00fc', 'ue'),\n    ('\u00df', 'ss'),\n]\n\n\n### Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.7/howto/static-files/\n\nSTATIC_URL = '/static/'\n\n# Additional locations of static files\nSTATICFILES_DIRS = (\n    os.path.join(BASE_DIR, \"static\"),\n)\n\n# Absolute path to the directory static files should be collected to.\nSTATIC_ROOT = os.path.join(BASE_DIR, \"static_collected\")\n\n\n### User-uploaded files\n\n# Absolute filesystem path to the directory that will hold user-uploaded files.\nMEDIA_ROOT = os.path.join(BASE_DIR, \"upload\")\n\n# URL that handles the media served from MEDIA_ROOT.\nMEDIA_URL = '/media/'\n\n# the backend used for downloading attachments\n# see https://github.com/johnsensible/django-sendfile for further information\nSENDFILE_BACKEND = 'sendfile.backends.simple'\n\n### Other\n\n# Apply the correct bootstrap css class to django's error messages\nMESSAGE_TAGS = {\n    messages.ERROR: 'danger',\n}\n\n# make generation of Question objects work, see https://github.com/vandersonmota/model_mommy/issues/231\nMOMMY_CUSTOM_FIELDS_GEN = {\n    'django.db.models.fields.proxy.OrderWrt': int,\n}\n\n# Create a localsettings.py if you want to locally override settings\n# and don't want the changes to appear in 'git status'.\ntry:\n    from evap.localsettings import *\nexcept ImportError:\n    pass\n\n# speed up tests by using sqlite\nif 'test' in sys.argv:\n    DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}\n\n# Django debug toolbar settings\nTESTING = 'test' in sys.argv\nif DEBUG and not TESTING 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", "path": "evap/settings.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDjango settings for EvaP project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.7/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.7/ref/settings/\n\"\"\"\n\nimport os\nimport sys\nfrom django.contrib.messages import constants as messages\n\nBASE_DIR = os.path.dirname(os.path.realpath(__file__))\n\n\n### Debugging\n\nDEBUG = True\n\n# Very helpful but eats a lot of performance on sql-heavy pages.\n# Works only with DEBUG = True and Django's development server (so no apache).\nENABLE_DEBUG_TOOLBAR = False\n\n\n### EvaP logic\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# number of reward points to be given to a student once all courses of a semester have been voted for\nREWARD_POINTS_PER_SEMESTER = 3\n\n# days before end date to send reminder\nREMIND_X_DAYS_AHEAD_OF_END_DATE = [2, 0]\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\", \"hpi.de\", \"student.hpi.de\"]\n\n# maximum length of usernames of internal users\nINTERNAL_USERNAMES_MAX_LENGTH = 20\n\n# the importer accepts only these two strings in the 'graded' column\nIMPORTER_GRADED_YES = \"yes\"\nIMPORTER_GRADED_NO = \"no\"\n\n# the default descriptions for grade documents\nDEFAULT_FINAL_GRADES_DESCRIPTION = \"Final grades\"\nDEFAULT_MIDTERM_GRADES_DESCRIPTION = \"Midterm grades\"\n\n\n### Installation specific settings\n\n# People who get emails on errors.\nADMINS = (\n    # ('Your Name', 'your_email@example.com'),\n)\n\n# localhost is listed for easier development. Remove it in production environments.\nALLOWED_HOSTS = [\"localhost\"]\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\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3', # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n        'NAME': os.path.join(BASE_DIR, '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        'CONN_MAX_AGE': 600,\n    }\n}\n\nCACHES = {\n    'default': {\n        'BACKEND': 'django.core.cache.backends.db.DatabaseCache',\n        'LOCATION': 'evap_db_cache',\n        'OPTIONS': {\n            'MAX_ENTRIES': 1000 # note that the results alone need one entry per course\n        }\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# Config for legal notice\n# The HTML file which should be used must be located in evap\\templates\\legal_notice_text.html\nLEGAL_NOTICE_ACTIVE = False\n\n\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'formatters': {\n        'default': {\n            'format': '[%(asctime)s] %(levelname)s: %(message)s',\n        },\n    },\n    'handlers': {\n        'file': {\n            'level': 'DEBUG',\n            'class': 'logging.handlers.RotatingFileHandler',\n            'filename': BASE_DIR + '/logs/evap.log',\n            'maxBytes': 1024*1024*10,\n            'backupCount': 5,\n            'formatter': 'default',\n        },\n        'mail_admins': {\n            'level': 'ERROR',\n            'class': 'django.utils.log.AdminEmailHandler',\n        }\n    },\n    'loggers': {\n        'django': {\n            'handlers': ['file'],\n            'level': 'INFO',\n            'propagate': True,\n        },\n        'evap': {\n            'handlers': ['file', 'mail_admins'],\n            'level': 'DEBUG',\n            'propagate': True,\n        },\n    },\n}\n\n\n### Application definition\n\nAUTH_USER_MODEL = 'evaluation.UserProfile'\n\nINSTALLED_APPS = (\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    'widget_tweaks',\n    'evap.evaluation',\n    'evap.staff',\n    'evap.results',\n    'evap.student',\n    'evap.contributor',\n    'evap.rewards',\n    'evap.grades',\n    'compressor',\n    'django_extensions',\n)\n\nMIDDLEWARE_CLASSES = (\n    'django.contrib.sessions.middleware.SessionMiddleware',\n    'django.middleware.common.CommonMiddleware',\n    'django.middleware.csrf.CsrfViewMiddleware',\n    'django.contrib.auth.middleware.AuthenticationMiddleware',\n    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',\n    'django.contrib.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n    'django.middleware.locale.LocaleMiddleware',\n    'evap.evaluation.auth.RequestAuthMiddleware',\n)\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [\n            os.path.join(BASE_DIR, \"templates\"),\n        ],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                \"django.contrib.auth.context_processors.auth\",\n                \"django.template.context_processors.debug\",\n                \"django.template.context_processors.i18n\",\n                \"django.template.context_processors.media\",\n                \"django.template.context_processors.static\",\n                \"django.template.context_processors.request\",\n                \"django.contrib.messages.context_processors.messages\",\n                \"evap.context_processors.feedback_email\",\n                \"evap.context_processors.legal_notice_active\",\n                \"evap.context_processors.tracker_url\",\n            ],\n        },\n    },\n]\n# enable cached template loader when DEBUG == False\nif not DEBUG:\n    TEMPLATES[0]['APP_DIRS'] = False\n    TEMPLATES[0]['OPTIONS']['loaders'] = [\n        ('django.template.loaders.cached.Loader', [\n            'django.template.loaders.filesystem.Loader',\n            'django.template.loaders.app_directories.Loader',\n        ]),\n    ]\n\nAUTHENTICATION_BACKENDS = (\n    'evap.evaluation.auth.RequestAuthUserBackend',\n    'django.contrib.auth.backends.ModelBackend',\n)\n\nROOT_URLCONF = 'evap.urls'\n\nWSGI_APPLICATION = 'evap.wsgi.application'\n\n# Redirect url after login\nLOGIN_REDIRECT_URL = '/'\n\nLOGIN_URL = \"/\"\n\n\n### Internationalization\n\nLANGUAGE_CODE = 'en'\n\nTIME_ZONE = 'Europe/Berlin'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = False\n\nLOCALE_PATHS = (\n    os.path.join(BASE_DIR, \"locale\"),\n)\n\nLANGUAGES = (\n    ('en', \"English\"),\n    ('de', \"Deutsch\"),\n)\n\nUSERNAME_REPLACEMENTS = [\n    (' ', ''),\n    ('\u00e4', 'ae'),\n    ('\u00f6', 'oe'),\n    ('\u00fc', 'ue'),\n    ('\u00df', 'ss'),\n]\n\n\n### Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.7/howto/static-files/\n\nSTATIC_URL = '/static/'\n\n# Additional locations of static files\nSTATICFILES_DIRS = (\n    os.path.join(BASE_DIR, \"static\"),\n)\n\nSTATICFILES_FINDERS = (\n    \"django.contrib.staticfiles.finders.FileSystemFinder\",\n    \"django.contrib.staticfiles.finders.AppDirectoriesFinder\",\n    \"compressor.finders.CompressorFinder\",\n)\n\n# Absolute path to the directory static files should be collected to.\nSTATIC_ROOT = os.path.join(BASE_DIR, \"static_collected\")\n\n\n### User-uploaded files\n\n# Absolute filesystem path to the directory that will hold user-uploaded files.\nMEDIA_ROOT = os.path.join(BASE_DIR, \"upload\")\n\n# URL that handles the media served from MEDIA_ROOT.\nMEDIA_URL = '/media/'\n\n# the backend used for downloading attachments\n# see https://github.com/johnsensible/django-sendfile for further information\nSENDFILE_BACKEND = 'sendfile.backends.simple'\n\n\n### Other\n\n# django-compressor settings\nCOMPRESS_ENABLED = not DEBUG\nCOMPRESS_OFFLINE = False\nCOMPRESS_PRECOMPILERS = (\n    ('text/less', 'lessc {infile} {outfile}'),\n)\nCOMPRESS_CACHEABLE_PRECOMPILERS = ('text/less',)\n\n# Apply the correct bootstrap css class to django's error messages\nMESSAGE_TAGS = {\n    messages.ERROR: 'danger',\n}\n\n# make generation of Question objects work, see https://github.com/vandersonmota/model_mommy/issues/231\nMOMMY_CUSTOM_FIELDS_GEN = {\n    'django.db.models.fields.proxy.OrderWrt': int,\n}\n\n# Create a localsettings.py if you want to locally override settings\n# and don't want the changes to appear in 'git status'.\ntry:\n    from evap.localsettings import *\nexcept ImportError:\n    pass\n\n# speed up tests by using sqlite\nif 'test' in sys.argv:\n    DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}\n\n# Django debug toolbar settings\nTESTING = 'test' in sys.argv\nif DEBUG and not TESTING 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", "path": "evap/settings.py"}]}