We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Убери пункт меню
Убери mp3 колонки из меню. Их больше не будет.
Я зашел в админку и выключил категорию. Надеюсь правильно ) 
http://prntscr.com/k553lt

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `shopelectro/templatetags/se_extras.py`
Content:
```
1 import datetime
2 import math
3 
4 from django import template
5 from django.conf import settings
6 from django.contrib.humanize.templatetags.humanize import intcomma
7 from django.template.defaultfilters import floatformat
8 from django.urls import reverse
9 
10 from images.models import ImageMixin
11 from pages.models import Page
12 
13 from shopelectro import config
14 from shopelectro.models import Category
15 
16 register = template.Library()
17 
18 
19 # TODO - move it in catalog. Inspired by lp_electric
20 @register.simple_tag
21 def roots():
22     return sorted(
23         Category.objects
24         .select_related('page')
25         .get_cached_trees(),  # https://goo.gl/rFKiku
26         key=lambda x: x.page.position
27     )
28 
29 
30 @register.simple_tag
31 def footer_links():
32     return config.FOOTER_LINKS
33 
34 
35 # TODO - move in pages. Inspired by LP electric
36 @register.filter
37 def class_name(model):
38     """Return Model name."""
39     return type(model).__name__
40 
41 
42 @register.simple_tag
43 def time_to_call():
44     def is_weekend(t):
45         return t.weekday() > 4
46 
47     def is_friday(t):
48         return t.weekday() == 4
49 
50     def not_yet_opened(t):
51         current_time = (t.hour, t.minute)
52         open_time = (10, 00)
53         return current_time < open_time and not is_weekend(t)
54 
55     def is_closed(t):
56         current_time = (t.hour, t.minute)
57         closing_time = (16, 30) if is_friday(t) else (17, 30)
58         return current_time > closing_time
59 
60     when_we_call = {
61         lambda now: is_weekend(now) or (is_friday(now) and is_closed(now)): 'В понедельник в 10:30',
62         lambda now: not_yet_opened(now): 'Сегодня в 10:30',
63         lambda now: is_closed(now) and not (is_friday(now) or is_weekend(now)): 'Завтра в 10:30',
64         lambda _: True: 'В течение 30 минут'
65     }
66 
67     time_ = datetime.datetime.now()
68     call = ' позвонит менеджер и обсудит детали доставки.'
69     for condition, time in when_we_call.items():
70         if condition(time_):
71             return time + call
72 
73 
74 # TODO - move it in pages.
75 @register.simple_tag
76 def full_url(url_name, *args):
77     return settings.BASE_URL + reverse(url_name, args=args)
78 
79 
80 @register.filter
81 def humanize_price(price):
82     return intcomma(floatformat(price, 0))
83 
84 
85 # Not good code, but duker at 06/10/2016 don't know how to fix it.
86 # It makes Image model very complex.
87 @register.simple_tag
88 def get_img_alt(entity: ImageMixin):
89     product_alt = 'Фотография {}'
90     logo_alt = 'Логотип компании Shopelectro'
91 
92     if not isinstance(entity, Page):
93         return logo_alt
94 
95     # try one of this attributes to get pages name
96     name_attrs = ['h1', 'title', 'name']
97     entity_name = next(
98         getattr(entity, attr)
99         for attr in name_attrs
100         if getattr(entity, attr)
101     )
102     return product_alt.format(entity_name)
103 
104 
105 @register.simple_tag
106 def main_image_or_logo(page: Page):
107     """Used for microdata."""
108     if hasattr(page, 'main_image') and page.main_image:
109         return page.main_image.url
110     else:
111         return settings.STATIC_URL + 'images/logo.png'
112 
113 
114 @register.inclusion_tag('catalog/product_feedbacks_icons.html')
115 def icon_stars(rating=0):
116     """Render set of rating icons based on 1 through 5 rating values."""
117     full_icons = int(math.floor(rating))
118     half_icons = 0 if rating == int(rating) else 1
119     empty_icons = 5 - full_icons - half_icons
120 
121     return {
122         'full_icons': range(full_icons),
123         'half_icons': range(half_icons),
124         'empty_icons': range(empty_icons),
125     }
126
```
--- 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/shopelectro/templatetags/se_extras.py b/shopelectro/templatetags/se_extras.py
--- a/shopelectro/templatetags/se_extras.py
+++ b/shopelectro/templatetags/se_extras.py
@@ -20,10 +20,13 @@
 @register.simple_tag
 def roots():
     return sorted(
-        Category.objects
-        .select_related('page')
-        .get_cached_trees(),  # https://goo.gl/rFKiku
-        key=lambda x: x.page.position
+        filter(
+            lambda x: x.page.is_active,
+            Category.objects  # https://goo.gl/rFKiku
+            .select_related('page')
+            .get_cached_trees()
+        ),
+        key=lambda x: x.page.position,
     )

{"golden_diff": "diff --git a/shopelectro/templatetags/se_extras.py b/shopelectro/templatetags/se_extras.py\n--- a/shopelectro/templatetags/se_extras.py\n+++ b/shopelectro/templatetags/se_extras.py\n@@ -20,10 +20,13 @@\n @register.simple_tag\n def roots():\n     return sorted(\n-        Category.objects\n-        .select_related('page')\n-        .get_cached_trees(),  # https://goo.gl/rFKiku\n-        key=lambda x: x.page.position\n+        filter(\n+            lambda x: x.page.is_active,\n+            Category.objects  # https://goo.gl/rFKiku\n+            .select_related('page')\n+            .get_cached_trees()\n+        ),\n+        key=lambda x: x.page.position,\n     )\n", "issue": "\u0423\u0431\u0435\u0440\u0438 \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e\n\u0423\u0431\u0435\u0440\u0438 mp3 \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u0438\u0437 \u043c\u0435\u043d\u044e. \u0418\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.\r\n\u042f \u0437\u0430\u0448\u0435\u043b \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0443 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043b \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e ) \r\nhttp://prntscr.com/k553lt\n", "before_files": [{"content": "import datetime\nimport math\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.humanize.templatetags.humanize import intcomma\nfrom django.template.defaultfilters import floatformat\nfrom django.urls import reverse\n\nfrom images.models import ImageMixin\nfrom pages.models import Page\n\nfrom shopelectro import config\nfrom shopelectro.models import Category\n\nregister = template.Library()\n\n\n# TODO - move it in catalog. Inspired by lp_electric\n@register.simple_tag\ndef roots():\n    return sorted(\n        Category.objects\n        .select_related('page')\n        .get_cached_trees(),  # https://goo.gl/rFKiku\n        key=lambda x: x.page.position\n    )\n\n\n@register.simple_tag\ndef footer_links():\n    return config.FOOTER_LINKS\n\n\n# TODO - move in pages. Inspired by LP electric\n@register.filter\ndef class_name(model):\n    \"\"\"Return Model name.\"\"\"\n    return type(model).__name__\n\n\n@register.simple_tag\ndef time_to_call():\n    def is_weekend(t):\n        return t.weekday() > 4\n\n    def is_friday(t):\n        return t.weekday() == 4\n\n    def not_yet_opened(t):\n        current_time = (t.hour, t.minute)\n        open_time = (10, 00)\n        return current_time < open_time and not is_weekend(t)\n\n    def is_closed(t):\n        current_time = (t.hour, t.minute)\n        closing_time = (16, 30) if is_friday(t) else (17, 30)\n        return current_time > closing_time\n\n    when_we_call = {\n        lambda now: is_weekend(now) or (is_friday(now) and is_closed(now)): '\u0412 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u0432 10:30',\n        lambda now: not_yet_opened(now): '\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0432 10:30',\n        lambda now: is_closed(now) and not (is_friday(now) or is_weekend(now)): '\u0417\u0430\u0432\u0442\u0440\u0430 \u0432 10:30',\n        lambda _: True: '\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 30 \u043c\u0438\u043d\u0443\u0442'\n    }\n\n    time_ = datetime.datetime.now()\n    call = ' \u043f\u043e\u0437\u0432\u043e\u043d\u0438\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0438 \u043e\u0431\u0441\u0443\u0434\u0438\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438.'\n    for condition, time in when_we_call.items():\n        if condition(time_):\n            return time + call\n\n\n# TODO - move it in pages.\n@register.simple_tag\ndef full_url(url_name, *args):\n    return settings.BASE_URL + reverse(url_name, args=args)\n\n\n@register.filter\ndef humanize_price(price):\n    return intcomma(floatformat(price, 0))\n\n\n# Not good code, but duker at 06/10/2016 don't know how to fix it.\n# It makes Image model very complex.\n@register.simple_tag\ndef get_img_alt(entity: ImageMixin):\n    product_alt = '\u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f {}'\n    logo_alt = '\u041b\u043e\u0433\u043e\u0442\u0438\u043f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Shopelectro'\n\n    if not isinstance(entity, Page):\n        return logo_alt\n\n    # try one of this attributes to get pages name\n    name_attrs = ['h1', 'title', 'name']\n    entity_name = next(\n        getattr(entity, attr)\n        for attr in name_attrs\n        if getattr(entity, attr)\n    )\n    return product_alt.format(entity_name)\n\n\n@register.simple_tag\ndef main_image_or_logo(page: Page):\n    \"\"\"Used for microdata.\"\"\"\n    if hasattr(page, 'main_image') and page.main_image:\n        return page.main_image.url\n    else:\n        return settings.STATIC_URL + 'images/logo.png'\n\n\n@register.inclusion_tag('catalog/product_feedbacks_icons.html')\ndef icon_stars(rating=0):\n    \"\"\"Render set of rating icons based on 1 through 5 rating values.\"\"\"\n    full_icons = int(math.floor(rating))\n    half_icons = 0 if rating == int(rating) else 1\n    empty_icons = 5 - full_icons - half_icons\n\n    return {\n        'full_icons': range(full_icons),\n        'half_icons': range(half_icons),\n        'empty_icons': range(empty_icons),\n    }\n", "path": "shopelectro/templatetags/se_extras.py"}], "after_files": [{"content": "import datetime\nimport math\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.humanize.templatetags.humanize import intcomma\nfrom django.template.defaultfilters import floatformat\nfrom django.urls import reverse\n\nfrom images.models import ImageMixin\nfrom pages.models import Page\n\nfrom shopelectro import config\nfrom shopelectro.models import Category\n\nregister = template.Library()\n\n\n# TODO - move it in catalog. Inspired by lp_electric\n@register.simple_tag\ndef roots():\n    return sorted(\n        filter(\n            lambda x: x.page.is_active,\n            Category.objects  # https://goo.gl/rFKiku\n            .select_related('page')\n            .get_cached_trees()\n        ),\n        key=lambda x: x.page.position,\n    )\n\n\n@register.simple_tag\ndef footer_links():\n    return config.FOOTER_LINKS\n\n\n# TODO - move in pages. Inspired by LP electric\n@register.filter\ndef class_name(model):\n    \"\"\"Return Model name.\"\"\"\n    return type(model).__name__\n\n\n@register.simple_tag\ndef time_to_call():\n    def is_weekend(t):\n        return t.weekday() > 4\n\n    def is_friday(t):\n        return t.weekday() == 4\n\n    def not_yet_opened(t):\n        current_time = (t.hour, t.minute)\n        open_time = (10, 00)\n        return current_time < open_time and not is_weekend(t)\n\n    def is_closed(t):\n        current_time = (t.hour, t.minute)\n        closing_time = (16, 30) if is_friday(t) else (17, 30)\n        return current_time > closing_time\n\n    when_we_call = {\n        lambda now: is_weekend(now) or (is_friday(now) and is_closed(now)): '\u0412 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u0432 10:30',\n        lambda now: not_yet_opened(now): '\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0432 10:30',\n        lambda now: is_closed(now) and not (is_friday(now) or is_weekend(now)): '\u0417\u0430\u0432\u0442\u0440\u0430 \u0432 10:30',\n        lambda _: True: '\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 30 \u043c\u0438\u043d\u0443\u0442'\n    }\n\n    time_ = datetime.datetime.now()\n    call = ' \u043f\u043e\u0437\u0432\u043e\u043d\u0438\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0438 \u043e\u0431\u0441\u0443\u0434\u0438\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438.'\n    for condition, time in when_we_call.items():\n        if condition(time_):\n            return time + call\n\n\n# TODO - move it in pages.\n@register.simple_tag\ndef full_url(url_name, *args):\n    return settings.BASE_URL + reverse(url_name, args=args)\n\n\n@register.filter\ndef humanize_price(price):\n    return intcomma(floatformat(price, 0))\n\n\n# Not good code, but duker at 06/10/2016 don't know how to fix it.\n# It makes Image model very complex.\n@register.simple_tag\ndef get_img_alt(entity: ImageMixin):\n    product_alt = '\u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f {}'\n    logo_alt = '\u041b\u043e\u0433\u043e\u0442\u0438\u043f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Shopelectro'\n\n    if not isinstance(entity, Page):\n        return logo_alt\n\n    # try one of this attributes to get pages name\n    name_attrs = ['h1', 'title', 'name']\n    entity_name = next(\n        getattr(entity, attr)\n        for attr in name_attrs\n        if getattr(entity, attr)\n    )\n    return product_alt.format(entity_name)\n\n\n@register.simple_tag\ndef main_image_or_logo(page: Page):\n    \"\"\"Used for microdata.\"\"\"\n    if hasattr(page, 'main_image') and page.main_image:\n        return page.main_image.url\n    else:\n        return settings.STATIC_URL + 'images/logo.png'\n\n\n@register.inclusion_tag('catalog/product_feedbacks_icons.html')\ndef icon_stars(rating=0):\n    \"\"\"Render set of rating icons based on 1 through 5 rating values.\"\"\"\n    full_icons = int(math.floor(rating))\n    half_icons = 0 if rating == int(rating) else 1\n    empty_icons = 5 - full_icons - half_icons\n\n    return {\n        'full_icons': range(full_icons),\n        'half_icons': range(half_icons),\n        'empty_icons': range(empty_icons),\n    }\n", "path": "shopelectro/templatetags/se_extras.py"}]}