We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Change development environment from docker-compose to venv
- [ ] Remove the django docker container
- [ ] Install package and requirements in venv
- [ ] Keep database docker container and manage connection to django

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `backend/backend/settings.py`
Content:
```
1 """
2 Django settings for backend project.
3 
4 Generated by 'django-admin startproject' using Django 1.11.11.
5 
6 For more information on this file, see
7 https://docs.djangoproject.com/en/1.11/topics/settings/
8 
9 For the full list of settings and their values, see
10 https://docs.djangoproject.com/en/1.11/ref/settings/
11 """
12 
13 import os
14 
15 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 
18 
19 # Quick-start development settings - unsuitable for production
20 # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
21 
22 # SECURITY WARNING: keep the secret key used in production secret!
23 SECRET_KEY = '-!v282$zj815_q@htaxcubylo)(l%a+k*-xi78hw*#s2@i86@_'
24 
25 # SECURITY WARNING: don't run with debug turned on in production!
26 DEBUG = True
27 
28 ALLOWED_HOSTS = [
29     'localhost',
30     '127.0.0.1',
31     '0.0.0.0'
32 ]
33 
34 
35 # Application definition
36 
37 INSTALLED_APPS = [
38     'cms.apps.CmsConfig',
39     'django.contrib.admin',
40     'django.contrib.auth',
41     'django.contrib.contenttypes',
42     'django.contrib.messages',
43     'django.contrib.sessions',
44     'django.contrib.staticfiles',
45     'widget_tweaks',
46     'easy_thumbnails',
47     'filer',
48     'drf_yasg',
49     'mptt',
50     'rest_framework',
51     'rules.apps.AutodiscoverRulesConfig',
52 ]
53 
54 MIDDLEWARE = [
55     'django.middleware.security.SecurityMiddleware',
56     'django.contrib.sessions.middleware.SessionMiddleware',
57     'django.middleware.locale.LocaleMiddleware',
58     'django.middleware.common.CommonMiddleware',
59     'django.middleware.csrf.CsrfViewMiddleware',
60     'django.contrib.auth.middleware.AuthenticationMiddleware',
61     'django.contrib.messages.middleware.MessageMiddleware',
62     'django.middleware.clickjacking.XFrameOptionsMiddleware',
63 ]
64 
65 ROOT_URLCONF = 'backend.urls'
66 THUMBNAIL_HIGH_RESOLUTION = True
67 
68 TEMPLATES = [
69     {
70         'BACKEND': 'django.template.backends.django.DjangoTemplates',
71         'DIRS': [],
72         'APP_DIRS': True,
73         'OPTIONS': {
74             'context_processors': [
75                 'django.template.context_processors.debug',
76                 'django.template.context_processors.request',
77                 'django.contrib.auth.context_processors.auth',
78                 'django.contrib.messages.context_processors.messages',
79                 'backend.context_processors.site_slug_processor',
80             ],
81         },
82     },
83 ]
84 
85 WSGI_APPLICATION = 'backend.wsgi.application'
86 
87 
88 # Database
89 # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
90 
91 DATABASES = {
92     'default': {
93         'ENGINE': 'django.db.backends.postgresql_psycopg2',
94         'NAME': 'integreat',
95         'USER': 'integreat',
96         'PASSWORD': 'password',
97         'HOST': 'postgres',
98         'PORT': '5432',
99     }
100 }
101 
102 # Directory for initial database contents
103 
104 FIXTURE_DIRS = (
105     os.path.join(BASE_DIR, 'cms/fixtures/'),
106 )
107 
108 # Authentication backends
109 
110 AUTHENTICATION_BACKENDS = (
111     'rules.permissions.ObjectPermissionBackend',
112     'django.contrib.auth.backends.ModelBackend', # this is default
113 )
114 
115 
116 # Password validation
117 # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
118 
119 AUTH_PASSWORD_VALIDATORS = [
120     {
121         'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
122     },
123     {
124         'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
125     },
126     {
127         'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
128     },
129     {
130         'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
131     },
132 ]
133 
134 
135 # Internationalization
136 # https://docs.djangoproject.com/en/1.11/topics/i18n/
137 
138 LANGUAGES = (
139     ('en-us', 'English'),
140     ('de-de', 'Deutsch'),
141 )
142 
143 LOCALE_PATHS = (
144     os.path.join(BASE_DIR, 'locale'),
145 )
146 
147 LANGUAGE_CODE = 'de-de'
148 
149 TIME_ZONE = 'UTC'
150 
151 USE_I18N = True
152 
153 USE_L10N = True
154 
155 USE_TZ = True
156 
157 
158 # Static files (CSS, JavaScript, Images)
159 # https://docs.djangoproject.com/en/1.11/howto/static-files/
160 
161 STATIC_URL = '/static/'
162 
163 
164 # Login
165 LOGIN_URL = '/login'
166 LOGIN_REDIRECT_URL = '/'
167 LOGOUT_REDIRECT_URL = '/login'
168 
169 # API FRAMEWORK
170 REST_FRAMEWORK = {
171     # Use Django's standard `django.contrib.auth` permissions,
172     # or allow read-only access for unauthenticated users.
173     'DEFAULT_PERMISSION_CLASSES': [
174         'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
175     ]
176 }
177 
178 # Miscellaneous
179 EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
180 CSRF_FAILURE_VIEW = 'cms.views.general.csrf_failure'
181 
182 MEDIA_URL = '/media/'
183 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
184 FILER_CANONICAL_URL = 'media/'
185 
186 LOGGING = {
187     'version': 1,
188     'disable_existing_loggers': False,
189     'handlers': {
190         'console': {
191             'class': 'logging.StreamHandler'
192         },
193     },
194     'loggers': {
195         'django': {
196             'handlers': ['console'],
197             'level': 'WARN',
198             'propagate': True,
199         },
200         'api': {
201             'handlers': ['console'],
202             'level': 'INFO',
203             'propagate': True,
204         },
205         'cms': {
206             'handlers': ['console'],
207             'level': 'INFO',
208             'propagate': True,
209         },
210         'rules': {
211             'handlers': ['console'],
212             'level': 'DEBUG',
213             'propagate': True,
214         },
215     }
216 }
217
```
--- 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/backend/backend/settings.py b/backend/backend/settings.py
--- a/backend/backend/settings.py
+++ b/backend/backend/settings.py
@@ -94,7 +94,7 @@
         'NAME': 'integreat',
         'USER': 'integreat',
         'PASSWORD': 'password',
-        'HOST': 'postgres',
+        'HOST': 'localhost',
         'PORT': '5432',
     }
 }

{"golden_diff": "diff --git a/backend/backend/settings.py b/backend/backend/settings.py\n--- a/backend/backend/settings.py\n+++ b/backend/backend/settings.py\n@@ -94,7 +94,7 @@\n         'NAME': 'integreat',\n         'USER': 'integreat',\n         'PASSWORD': 'password',\n-        'HOST': 'postgres',\n+        'HOST': 'localhost',\n         'PORT': '5432',\n     }\n }\n", "issue": "Change development environment from docker-compose to venv\n- [ ] Remove the django docker container\r\n- [ ] Install package and requirements in venv\r\n- [ ] Keep database docker container and manage connection to django\n", "before_files": [{"content": "\"\"\"\nDjango settings for backend project.\n\nGenerated by 'django-admin startproject' using Django 1.11.11.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.11/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.11/ref/settings/\n\"\"\"\n\nimport os\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = '-!v282$zj815_q@htaxcubylo)(l%a+k*-xi78hw*#s2@i86@_'\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nALLOWED_HOSTS = [\n    'localhost',\n    '127.0.0.1',\n    '0.0.0.0'\n]\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    'cms.apps.CmsConfig',\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.messages',\n    'django.contrib.sessions',\n    'django.contrib.staticfiles',\n    'widget_tweaks',\n    'easy_thumbnails',\n    'filer',\n    'drf_yasg',\n    'mptt',\n    'rest_framework',\n    'rules.apps.AutodiscoverRulesConfig',\n]\n\nMIDDLEWARE = [\n    'django.middleware.security.SecurityMiddleware',\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.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'backend.urls'\nTHUMBNAIL_HIGH_RESOLUTION = True\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n                'backend.context_processors.site_slug_processor',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'backend.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.11/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql_psycopg2',\n        'NAME': 'integreat',\n        'USER': 'integreat',\n        'PASSWORD': 'password',\n        'HOST': 'postgres',\n        'PORT': '5432',\n    }\n}\n\n# Directory for initial database contents\n\nFIXTURE_DIRS = (\n    os.path.join(BASE_DIR, 'cms/fixtures/'),\n)\n\n# Authentication backends\n\nAUTHENTICATION_BACKENDS = (\n    'rules.permissions.ObjectPermissionBackend',\n    'django.contrib.auth.backends.ModelBackend', # this is default\n)\n\n\n# Password validation\n# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',\n    },\n]\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.11/topics/i18n/\n\nLANGUAGES = (\n    ('en-us', 'English'),\n    ('de-de', 'Deutsch'),\n)\n\nLOCALE_PATHS = (\n    os.path.join(BASE_DIR, 'locale'),\n)\n\nLANGUAGE_CODE = 'de-de'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.11/howto/static-files/\n\nSTATIC_URL = '/static/'\n\n\n# Login\nLOGIN_URL = '/login'\nLOGIN_REDIRECT_URL = '/'\nLOGOUT_REDIRECT_URL = '/login'\n\n# API FRAMEWORK\nREST_FRAMEWORK = {\n    # Use Django's standard `django.contrib.auth` permissions,\n    # or allow read-only access for unauthenticated users.\n    'DEFAULT_PERMISSION_CLASSES': [\n        'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'\n    ]\n}\n\n# Miscellaneous\nEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\nCSRF_FAILURE_VIEW = 'cms.views.general.csrf_failure'\n\nMEDIA_URL = '/media/'\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\nFILER_CANONICAL_URL = 'media/'\n\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'handlers': {\n        'console': {\n            'class': 'logging.StreamHandler'\n        },\n    },\n    'loggers': {\n        'django': {\n            'handlers': ['console'],\n            'level': 'WARN',\n            'propagate': True,\n        },\n        'api': {\n            'handlers': ['console'],\n            'level': 'INFO',\n            'propagate': True,\n        },\n        'cms': {\n            'handlers': ['console'],\n            'level': 'INFO',\n            'propagate': True,\n        },\n        'rules': {\n            'handlers': ['console'],\n            'level': 'DEBUG',\n            'propagate': True,\n        },\n    }\n}\n", "path": "backend/backend/settings.py"}], "after_files": [{"content": "\"\"\"\nDjango settings for backend project.\n\nGenerated by 'django-admin startproject' using Django 1.11.11.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.11/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.11/ref/settings/\n\"\"\"\n\nimport os\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = '-!v282$zj815_q@htaxcubylo)(l%a+k*-xi78hw*#s2@i86@_'\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nALLOWED_HOSTS = [\n    'localhost',\n    '127.0.0.1',\n    '0.0.0.0'\n]\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    'cms.apps.CmsConfig',\n    'django.contrib.admin',\n    'django.contrib.auth',\n    'django.contrib.contenttypes',\n    'django.contrib.messages',\n    'django.contrib.sessions',\n    'django.contrib.staticfiles',\n    'widget_tweaks',\n    'easy_thumbnails',\n    'filer',\n    'drf_yasg',\n    'mptt',\n    'rest_framework',\n    'rules.apps.AutodiscoverRulesConfig',\n]\n\nMIDDLEWARE = [\n    'django.middleware.security.SecurityMiddleware',\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.messages.middleware.MessageMiddleware',\n    'django.middleware.clickjacking.XFrameOptionsMiddleware',\n]\n\nROOT_URLCONF = 'backend.urls'\nTHUMBNAIL_HIGH_RESOLUTION = True\n\nTEMPLATES = [\n    {\n        'BACKEND': 'django.template.backends.django.DjangoTemplates',\n        'DIRS': [],\n        'APP_DIRS': True,\n        'OPTIONS': {\n            'context_processors': [\n                'django.template.context_processors.debug',\n                'django.template.context_processors.request',\n                'django.contrib.auth.context_processors.auth',\n                'django.contrib.messages.context_processors.messages',\n                'backend.context_processors.site_slug_processor',\n            ],\n        },\n    },\n]\n\nWSGI_APPLICATION = 'backend.wsgi.application'\n\n\n# Database\n# https://docs.djangoproject.com/en/1.11/ref/settings/#databases\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql_psycopg2',\n        'NAME': 'integreat',\n        'USER': 'integreat',\n        'PASSWORD': 'password',\n        'HOST': 'localhost',\n        'PORT': '5432',\n    }\n}\n\n# Directory for initial database contents\n\nFIXTURE_DIRS = (\n    os.path.join(BASE_DIR, 'cms/fixtures/'),\n)\n\n# Authentication backends\n\nAUTHENTICATION_BACKENDS = (\n    'rules.permissions.ObjectPermissionBackend',\n    'django.contrib.auth.backends.ModelBackend', # this is default\n)\n\n\n# Password validation\n# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators\n\nAUTH_PASSWORD_VALIDATORS = [\n    {\n        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',\n    },\n    {\n        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',\n    },\n]\n\n\n# Internationalization\n# https://docs.djangoproject.com/en/1.11/topics/i18n/\n\nLANGUAGES = (\n    ('en-us', 'English'),\n    ('de-de', 'Deutsch'),\n)\n\nLOCALE_PATHS = (\n    os.path.join(BASE_DIR, 'locale'),\n)\n\nLANGUAGE_CODE = 'de-de'\n\nTIME_ZONE = 'UTC'\n\nUSE_I18N = True\n\nUSE_L10N = True\n\nUSE_TZ = True\n\n\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/1.11/howto/static-files/\n\nSTATIC_URL = '/static/'\n\n\n# Login\nLOGIN_URL = '/login'\nLOGIN_REDIRECT_URL = '/'\nLOGOUT_REDIRECT_URL = '/login'\n\n# API FRAMEWORK\nREST_FRAMEWORK = {\n    # Use Django's standard `django.contrib.auth` permissions,\n    # or allow read-only access for unauthenticated users.\n    'DEFAULT_PERMISSION_CLASSES': [\n        'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'\n    ]\n}\n\n# Miscellaneous\nEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'\nCSRF_FAILURE_VIEW = 'cms.views.general.csrf_failure'\n\nMEDIA_URL = '/media/'\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\nFILER_CANONICAL_URL = 'media/'\n\nLOGGING = {\n    'version': 1,\n    'disable_existing_loggers': False,\n    'handlers': {\n        'console': {\n            'class': 'logging.StreamHandler'\n        },\n    },\n    'loggers': {\n        'django': {\n            'handlers': ['console'],\n            'level': 'WARN',\n            'propagate': True,\n        },\n        'api': {\n            'handlers': ['console'],\n            'level': 'INFO',\n            'propagate': True,\n        },\n        'cms': {\n            'handlers': ['console'],\n            'level': 'INFO',\n            'propagate': True,\n        },\n        'rules': {\n            'handlers': ['console'],\n            'level': 'DEBUG',\n            'propagate': True,\n        },\n    }\n}\n", "path": "backend/backend/settings.py"}]}