We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Session Form: Make Title and Name always required
In session forms in step 5 of the wizard make "Title" and "Name" always required. Maybe we should make those in another color, so it becomes clear that they cannot be edited or change the UI somehow?

![screenshot from 2016-06-15 08 17 55](https://cloud.githubusercontent.com/assets/1583873/16069896/257ff8d4-32d2-11e6-840d-53ea58adb955.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: `open_event/views/admin/models_views/events.py`
Content:
```
1 import os
2 
3 from flask import request, url_for, redirect
4 from flask_admin import expose
5 from flask_admin.contrib.sqla import ModelView
6 from flask.ext import login
7 from ....helpers.data import DataManager, save_to_db
8 from ....helpers.data_getter import DataGetter
9 from datetime import datetime
10 from werkzeug.utils import secure_filename
11 from werkzeug.datastructures import ImmutableMultiDict
12 
13 class EventsView(ModelView):
14     def is_accessible(self):
15         return login.current_user.is_authenticated
16 
17     def _handle_view(self, name, **kwargs):
18         if not self.is_accessible():
19             return redirect(url_for('admin.login_view', next=request.url))
20 
21     @expose('/')
22     def index_view(self):
23         live_events = DataGetter.get_live_events()
24         draft_events = DataGetter.get_draft_events()
25         past_events = DataGetter.get_past_events()
26         all_events = DataGetter.get_all_events()
27         return self.render('/gentelella/admin/event/index.html',
28                            live_events=live_events, draft_events=draft_events, past_events=past_events,
29                            all_events=all_events)
30 
31     @expose('/create/', methods=('GET', 'POST'))
32     def create_view(self):
33         session_columns = DataGetter.get_session_columns()
34         speaker_columns = DataGetter.get_speaker_columns()
35         if request.method == 'POST':
36             imd = ImmutableMultiDict(request.files)
37             for img_file in imd.getlist('sponsors[logo]'):
38                 filename = secure_filename(img_file.filename)
39                 img_file.save(os.path.join(os.path.realpath('.') + '/static/media/image/', filename))
40             event = DataManager.create_event(request.form, imd)
41             if event:
42                 return redirect(url_for('.details_view', event_id=event.id))
43             return redirect(url_for('.index_view'))
44         return self.render('/gentelella/admin/event/new/new.html',
45                            session_columns=session_columns,
46                            speaker_columns=speaker_columns,
47                            event_types=DataGetter.get_event_types(),
48                            event_topics=DataGetter.get_event_topics())
49 
50     @expose('/<int:event_id>/', methods=('GET', 'POST'))
51     def details_view(self, event_id):
52         event = DataGetter.get_event(event_id)
53 
54         return self.render('/gentelella/admin/event/details/details.html', event=event)
55 
56     @expose('/<int:event_id>/edit/', methods=('GET', 'POST'))
57     def edit_view(self, event_id):
58         event = DataGetter.get_event(event_id)
59         session_types = DataGetter.get_session_types_by_event_id(event_id)
60         tracks = DataGetter.get_tracks(event_id)
61         social_links = DataGetter.get_social_links_by_event_id(event_id)
62         microlocations = DataGetter.get_microlocations(event_id)
63         call_for_speakers = DataGetter.get_call_for_papers(event_id).first()
64         sponsors = DataGetter.get_sponsors(event_id)
65         session_columns = DataGetter.get_session_columns()
66         speaker_columns = DataGetter.get_speaker_columns()
67         if request.method == 'GET':
68             return self.render('/gentelella/admin/event/edit/edit.html', event=event, session_types=session_types,
69                                tracks=tracks, social_links=social_links, microlocations=microlocations,
70                                call_for_speakers=call_for_speakers, sponsors=sponsors, session_columns=session_columns,
71                                speaker_columns=speaker_columns, event_types=DataGetter.get_event_types(),
72                                event_topics=DataGetter.get_event_topics())
73         if request.method == "POST":
74             event = DataManager.edit_event(request.form, event_id, event, session_types, tracks, social_links,
75                                            microlocations, call_for_speakers, sponsors)
76             return self.render('/gentelella/admin/event/details/details.html', event=event)
77 
78     @expose('/<event_id>/delete/', methods=('GET',))
79     def delete_view(self, event_id):
80         if request.method == "GET":
81             DataManager.delete_event(event_id)
82         return redirect(url_for('.index_view'))
83 
84     @expose('/<int:event_id>/update/', methods=('POST',))
85     def save_closing_date(self, event_id):
86         event = DataGetter.get_event(event_id)
87         event.closing_datetime = request.form['closing_datetime']
88         save_to_db(event, 'Closing Datetime Updated')
89         return self.render('/gentelella/admin/event/details/details.html', event=event)
90
```
--- 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/open_event/views/admin/models_views/events.py b/open_event/views/admin/models_views/events.py
--- a/open_event/views/admin/models_views/events.py
+++ b/open_event/views/admin/models_views/events.py
@@ -29,6 +29,9 @@
     def create_view(self):
         session_columns = DataGetter.get_session_columns()
         speaker_columns = DataGetter.get_speaker_columns()
+        speaker_columns = list(speaker_columns)
+        speaker_columns.insert(2, speaker_columns.pop(4))  # Moving email to the top
+
         if request.method == 'POST':
             event = DataManager.create_event(request.form)
             if event:
@@ -57,6 +60,7 @@
         sponsors = DataGetter.get_sponsors(event_id)
         session_columns = DataGetter.get_session_columns()
         speaker_columns = DataGetter.get_speaker_columns()
+
         if request.method == 'GET':
             return self.render('/gentelella/admin/event/edit/edit.html', event=event, session_types=session_types,
                                tracks=tracks, social_links=social_links, microlocations=microlocations,

{"golden_diff": "diff --git a/open_event/views/admin/models_views/events.py b/open_event/views/admin/models_views/events.py\n--- a/open_event/views/admin/models_views/events.py\n+++ b/open_event/views/admin/models_views/events.py\n@@ -29,6 +29,9 @@\n     def create_view(self):\n         session_columns = DataGetter.get_session_columns()\n         speaker_columns = DataGetter.get_speaker_columns()\n+        speaker_columns = list(speaker_columns)\n+        speaker_columns.insert(2, speaker_columns.pop(4))  # Moving email to the top\n+\n         if request.method == 'POST':\n             event = DataManager.create_event(request.form)\n             if event:\n@@ -57,6 +60,7 @@\n         sponsors = DataGetter.get_sponsors(event_id)\n         session_columns = DataGetter.get_session_columns()\n         speaker_columns = DataGetter.get_speaker_columns()\n+\n         if request.method == 'GET':\n             return self.render('/gentelella/admin/event/edit/edit.html', event=event, session_types=session_types,\n                                tracks=tracks, social_links=social_links, microlocations=microlocations,\n", "issue": "Session Form: Make Title and Name always required\nIn session forms in step 5 of the wizard make \"Title\" and \"Name\" always required. Maybe we should make those in another color, so it becomes clear that they cannot be edited or change the UI somehow?\n\n![screenshot from 2016-06-15 08 17 55](https://cloud.githubusercontent.com/assets/1583873/16069896/257ff8d4-32d2-11e6-840d-53ea58adb955.png)\n\n", "before_files": [{"content": "import os\n\nfrom flask import request, url_for, redirect\nfrom flask_admin import expose\nfrom flask_admin.contrib.sqla import ModelView\nfrom flask.ext import login\nfrom ....helpers.data import DataManager, save_to_db\nfrom ....helpers.data_getter import DataGetter\nfrom datetime import datetime\nfrom werkzeug.utils import secure_filename\nfrom werkzeug.datastructures import ImmutableMultiDict\n\nclass EventsView(ModelView):\n    def is_accessible(self):\n        return login.current_user.is_authenticated\n\n    def _handle_view(self, name, **kwargs):\n        if not self.is_accessible():\n            return redirect(url_for('admin.login_view', next=request.url))\n\n    @expose('/')\n    def index_view(self):\n        live_events = DataGetter.get_live_events()\n        draft_events = DataGetter.get_draft_events()\n        past_events = DataGetter.get_past_events()\n        all_events = DataGetter.get_all_events()\n        return self.render('/gentelella/admin/event/index.html',\n                           live_events=live_events, draft_events=draft_events, past_events=past_events,\n                           all_events=all_events)\n\n    @expose('/create/', methods=('GET', 'POST'))\n    def create_view(self):\n        session_columns = DataGetter.get_session_columns()\n        speaker_columns = DataGetter.get_speaker_columns()\n        if request.method == 'POST':\n            imd = ImmutableMultiDict(request.files)\n            for img_file in imd.getlist('sponsors[logo]'):\n                filename = secure_filename(img_file.filename)\n                img_file.save(os.path.join(os.path.realpath('.') + '/static/media/image/', filename))\n            event = DataManager.create_event(request.form, imd)\n            if event:\n                return redirect(url_for('.details_view', event_id=event.id))\n            return redirect(url_for('.index_view'))\n        return self.render('/gentelella/admin/event/new/new.html',\n                           session_columns=session_columns,\n                           speaker_columns=speaker_columns,\n                           event_types=DataGetter.get_event_types(),\n                           event_topics=DataGetter.get_event_topics())\n\n    @expose('/<int:event_id>/', methods=('GET', 'POST'))\n    def details_view(self, event_id):\n        event = DataGetter.get_event(event_id)\n\n        return self.render('/gentelella/admin/event/details/details.html', event=event)\n\n    @expose('/<int:event_id>/edit/', methods=('GET', 'POST'))\n    def edit_view(self, event_id):\n        event = DataGetter.get_event(event_id)\n        session_types = DataGetter.get_session_types_by_event_id(event_id)\n        tracks = DataGetter.get_tracks(event_id)\n        social_links = DataGetter.get_social_links_by_event_id(event_id)\n        microlocations = DataGetter.get_microlocations(event_id)\n        call_for_speakers = DataGetter.get_call_for_papers(event_id).first()\n        sponsors = DataGetter.get_sponsors(event_id)\n        session_columns = DataGetter.get_session_columns()\n        speaker_columns = DataGetter.get_speaker_columns()\n        if request.method == 'GET':\n            return self.render('/gentelella/admin/event/edit/edit.html', event=event, session_types=session_types,\n                               tracks=tracks, social_links=social_links, microlocations=microlocations,\n                               call_for_speakers=call_for_speakers, sponsors=sponsors, session_columns=session_columns,\n                               speaker_columns=speaker_columns, event_types=DataGetter.get_event_types(),\n                               event_topics=DataGetter.get_event_topics())\n        if request.method == \"POST\":\n            event = DataManager.edit_event(request.form, event_id, event, session_types, tracks, social_links,\n                                           microlocations, call_for_speakers, sponsors)\n            return self.render('/gentelella/admin/event/details/details.html', event=event)\n\n    @expose('/<event_id>/delete/', methods=('GET',))\n    def delete_view(self, event_id):\n        if request.method == \"GET\":\n            DataManager.delete_event(event_id)\n        return redirect(url_for('.index_view'))\n\n    @expose('/<int:event_id>/update/', methods=('POST',))\n    def save_closing_date(self, event_id):\n        event = DataGetter.get_event(event_id)\n        event.closing_datetime = request.form['closing_datetime']\n        save_to_db(event, 'Closing Datetime Updated')\n        return self.render('/gentelella/admin/event/details/details.html', event=event)\n", "path": "open_event/views/admin/models_views/events.py"}], "after_files": [{"content": "from flask import request, url_for, redirect\nfrom flask_admin import expose\nfrom flask_admin.contrib.sqla import ModelView\nfrom flask.ext import login\nfrom ....helpers.data import DataManager, save_to_db\nfrom ....helpers.data_getter import DataGetter\nfrom datetime import datetime\n\n\nclass EventsView(ModelView):\n    def is_accessible(self):\n        return login.current_user.is_authenticated\n\n    def _handle_view(self, name, **kwargs):\n        if not self.is_accessible():\n            return redirect(url_for('admin.login_view', next=request.url))\n\n    @expose('/')\n    def index_view(self):\n        live_events = DataGetter.get_live_events()\n        draft_events = DataGetter.get_draft_events()\n        past_events = DataGetter.get_past_events()\n        all_events = DataGetter.get_all_events()\n        return self.render('/gentelella/admin/event/index.html',\n                           live_events=live_events, draft_events=draft_events, past_events=past_events,\n                           all_events=all_events)\n\n    @expose('/create/', methods=('GET', 'POST'))\n    def create_view(self):\n        session_columns = DataGetter.get_session_columns()\n        speaker_columns = DataGetter.get_speaker_columns()\n        speaker_columns = list(speaker_columns)\n        speaker_columns.insert(2, speaker_columns.pop(4))  # Moving email to the top\n\n        if request.method == 'POST':\n            event = DataManager.create_event(request.form)\n            if event:\n                return redirect(url_for('.details_view', event_id=event.id))\n            return redirect(url_for('.index_view'))\n        return self.render('/gentelella/admin/event/new/new.html',\n                           session_columns=session_columns,\n                           speaker_columns=speaker_columns,\n                           event_types=DataGetter.get_event_types(),\n                           event_topics=DataGetter.get_event_topics())\n\n    @expose('/<int:event_id>/', methods=('GET', 'POST'))\n    def details_view(self, event_id):\n        event = DataGetter.get_event(event_id)\n\n        return self.render('/gentelella/admin/event/details/details.html', event=event)\n\n    @expose('/<int:event_id>/edit/', methods=('GET', 'POST'))\n    def edit_view(self, event_id):\n        event = DataGetter.get_event(event_id)\n        session_types = DataGetter.get_session_types_by_event_id(event_id)\n        tracks = DataGetter.get_tracks(event_id)\n        social_links = DataGetter.get_social_links_by_event_id(event_id)\n        microlocations = DataGetter.get_microlocations(event_id)\n        call_for_speakers = DataGetter.get_call_for_papers(event_id).first()\n        sponsors = DataGetter.get_sponsors(event_id)\n        session_columns = DataGetter.get_session_columns()\n        speaker_columns = DataGetter.get_speaker_columns()\n\n        if request.method == 'GET':\n            return self.render('/gentelella/admin/event/edit/edit.html', event=event, session_types=session_types,\n                               tracks=tracks, social_links=social_links, microlocations=microlocations,\n                               call_for_speakers=call_for_speakers, sponsors=sponsors, session_columns=session_columns,\n                               speaker_columns=speaker_columns, event_types=DataGetter.get_event_types(),\n                               event_topics=DataGetter.get_event_topics())\n        if request.method == \"POST\":\n            event = DataManager.edit_event(request.form, event_id, event, session_types, tracks, social_links,\n                                           microlocations, call_for_speakers, sponsors)\n            return self.render('/gentelella/admin/event/details/details.html', event=event)\n\n    @expose('/<event_id>/delete/', methods=('GET',))\n    def delete_view(self, event_id):\n        if request.method == \"GET\":\n            DataManager.delete_event(event_id)\n        return redirect(url_for('.index_view'))\n\n    @expose('/<int:event_id>/update/', methods=('POST',))\n    def save_closing_date(self, event_id):\n        event = DataGetter.get_event(event_id)\n        event.closing_datetime = request.form['closing_datetime']\n        save_to_db(event, 'Closing Datetime Updated')\n        return self.render('/gentelella/admin/event/details/details.html', event=event)\n", "path": "open_event/views/admin/models_views/events.py"}]}