prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Wrong QuerySet in RobotsView stb2
  Currently it looks so `CustomPage.objects.filter(slug='robots')` and should be `.filter(slug='robots.txt')`
  
  --- 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/urls.py`
  Content:
  ```
  1 from collections import OrderedDict
  2 
  3 from django.conf import settings
  4 from django.conf.urls import url, include
  5 from django.conf.urls.static import static
  6 from django.contrib.sitemaps.views import sitemap
  7 from django.views.decorators.cache import cache_page
  8 
  9 from pages.views import RobotsView, SitemapPage
  10 from pages.urls import custom_page_url
  11 
  12 from shopelectro import sitemaps, config, views
  13 from shopelectro.admin import se_admin
  14 
  15 # Orders sitemaps instances
  16 sitemaps = OrderedDict([
  17     ('index', sitemaps.IndexSitemap),
  18     ('category', sitemaps.CategorySitemap),
  19     ('category-with-tags', sitemaps.CategoryWithTagsSitemap),
  20     ('products', sitemaps.ProductSitemap),
  21     ('site', sitemaps.PagesSitemap)
  22 ])
  23 
  24 # disable cache
  25 if settings.DEBUG:
  26     def cache_page(arg):  # Ignore PyFlakesBear
  27         if callable(arg):
  28             return arg
  29         return cache_page
  30 
  31 cached_60d = cache_page(config.cached_time(days=60))
  32 cached_2h = cache_page(config.cached_time(hours=2))
  33 
  34 admin_urls = [
  35     url(r'^', se_admin.urls),
  36     url(r'^autocomplete/$', views.AdminAutocomplete.as_view(), name='admin_autocomplete'),
  37     url(r'^get-tree-items/$', views.Tree.as_view()),
  38     url(r'^redirect-to-product/$', views.RedirectToProduct.as_view()),
  39     url(r'^table-editor-api/$', views.TableEditorAPI.as_view()),
  40     url(r'^select2/', include('django_select2.urls')),
  41 ]
  42 
  43 catalog_urls = [
  44     # "category" group
  45     url(r'^categories/(?P<slug>[\w-]+)/$',
  46         cached_2h(views.CategoryPage.as_view()), name='category'),
  47     url(r'^categories/(?P<slug>[\w-]+)/tags/(?P<tags>[\w-]+)/$',
  48         cached_2h(views.CategoryPage.as_view()), name='category'),
  49     url(r'^categories/(?P<slug>[\w-]+)/(?P<sorting>[0-9]*)/$',
  50         views.CategoryPage.as_view(), name='category'),
  51     url(r'^categories/(?P<slug>[\w-]+)/(?P<sorting>[0-9]*)/tags/(?P<tags>[\w-]+)/$',
  52         views.CategoryPage.as_view(), name='category'),
  53     # "load more" group
  54     url(r'categories/(?P<category_slug>[\w-]+)/load-more/'
  55         r'(?P<offset>[0-9]+)/(?P<sorting>[0-9]*)/$',
  56         views.load_more, name='load_more'),
  57     url(r'categories/(?P<category_slug>[\w-]+)/load-more/'
  58         r'(?P<offset>[0-9]+)/(?P<sorting>[0-9]*)/tags/(?P<tags>[\w-]+)/$',
  59         views.load_more, name='load_more'),
  60     # rest of urls
  61     url(r'^no-images/$', views.ProductsWithoutImages.as_view(),
  62         name='products_without_images'),
  63     url(r'^no-text/$', views.ProductsWithoutText.as_view(),
  64         name='products_without_text'),
  65     url(r'^products/(?P<product_vendor_code>[0-9]+)/$',
  66         views.ProductPage.as_view(), name='product'),
  67 ]
  68 
  69 service_urls = [
  70     url(r'^ya-kassa/aviso/$', views.yandex_aviso, name='yandex_aviso'),
  71     url(r'^ya-kassa/check/$', views.yandex_check, name='yandex_check'),
  72     url(r'^ya-feedback/redirect/$',
  73         views.ya_feedback_with_redirect, name='ya_feedback_with_redirect'),
  74     url(r'^ya-feedback/request/$',
  75         views.ya_feedback_request, name='ya_feedback_request'),
  76 ]
  77 
  78 search_urls = [
  79     url(r'^autocomplete/$', views.Autocomplete.as_view(), name='autocomplete'),
  80 ]
  81 
  82 ecommerce_urls = [
  83     url(r'^cart-add/$', views.AddToCart.as_view(), name='cart_add'),
  84     url(r'^cart-change/$', views.ChangeCount.as_view(), name='cart_set_count'),
  85     url(r'^cart-flush/$', views.FlushCart.as_view(), name='cart_flush'),
  86     url(r'^cart-remove/$', views.RemoveFromCart.as_view(), name='cart_remove'),
  87     url(r'^order-call/$', views.order_call),
  88     url(r'^one-click-buy/$', views.one_click_buy),
  89     url(r'^yandex-order/$', views.YandexOrder.as_view()),
  90     url(r'', include('ecommerce.urls')),
  91 ]
  92 
  93 custom_pages = [
  94     custom_page_url(r'^(?P<page>)$', cached_2h(views.IndexPage.as_view())),
  95     custom_page_url(r'^(?P<page>robots\.txt)$', RobotsView.as_view(in_db=True)),
  96     custom_page_url(r'^(?P<page>search)/$', views.Search.as_view()),
  97     custom_page_url(r'^(?P<page>catalog)/$', cached_2h(views.CategoryTree.as_view())),
  98     custom_page_url(r'^shop/(?P<page>order)/$', views.OrderPage.as_view()),
  99     custom_page_url(r'^shop/(?P<page>order-success)/$', views.OrderSuccess.as_view()),
  100     custom_page_url(r'^(?P<page>sitemap)/$', SitemapPage.as_view()),
  101 ]
  102 
  103 urlpatterns = [
  104     url('', include(custom_pages)),
  105     url(r'^admin/', include(admin_urls)),
  106     url(r'^catalog/', include(catalog_urls)),
  107     url(r'^pages/', include('pages.urls')),
  108     url(r'^save-feedback/$', views.save_feedback),
  109     url(r'^delete-feedback/$', views.delete_feedback),
  110     url(r'^set-view-type/$', views.set_view_type, name='set_view_type'),
  111     url(r'^shop/', include(ecommerce_urls)),
  112     url(r'^search/', include(search_urls)),
  113     url(r'^service/', include(service_urls)),
  114     url(r'^sitemap\.xml$', cached_60d(sitemap), {'sitemaps': sitemaps}, name='sitemap'),
  115 ]
  116 
  117 if settings.DEBUG:
  118     import debug_toolbar
  119 
  120     urlpatterns += [
  121         url(r'^__debug__/', include(debug_toolbar.urls)),
  122         *static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),
  123         *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
  124     ]
  125
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/shopelectro/urls.py b/shopelectro/urls.py
  --- a/shopelectro/urls.py
  +++ b/shopelectro/urls.py
  @@ -6,6 +6,7 @@
   from django.contrib.sitemaps.views import sitemap
   from django.views.decorators.cache import cache_page
   
  +from pages.models import CustomPage
   from pages.views import RobotsView, SitemapPage
   from pages.urls import custom_page_url
   
  @@ -92,7 +93,10 @@
   
   custom_pages = [
       custom_page_url(r'^(?P<page>)$', cached_2h(views.IndexPage.as_view())),
  -    custom_page_url(r'^(?P<page>robots\.txt)$', RobotsView.as_view(in_db=True)),
  +    custom_page_url(
  +        r'^(?P<page>robots\.txt)$',
  +        RobotsView.as_view(in_db=True, objects=CustomPage.objects.filter(slug='robots.txt'))
  +    ),
       custom_page_url(r'^(?P<page>search)/$', views.Search.as_view()),
       custom_page_url(r'^(?P<page>catalog)/$', cached_2h(views.CategoryTree.as_view())),
       custom_page_url(r'^shop/(?P<page>order)/$', views.OrderPage.as_view()),
  
verification_info: {"golden_diff": "diff --git a/shopelectro/urls.py b/shopelectro/urls.py\n--- a/shopelectro/urls.py\n+++ b/shopelectro/urls.py\n@@ -6,6 +6,7 @@\n from django.contrib.sitemaps.views import sitemap\n from django.views.decorators.cache import cache_page\n \n+from pages.models import CustomPage\n from pages.views import RobotsView, SitemapPage\n from pages.urls import custom_page_url\n \n@@ -92,7 +93,10 @@\n \n custom_pages = [\n     custom_page_url(r'^(?P<page>)$', cached_2h(views.IndexPage.as_view())),\n-    custom_page_url(r'^(?P<page>robots\\.txt)$', RobotsView.as_view(in_db=True)),\n+    custom_page_url(\n+        r'^(?P<page>robots\\.txt)$',\n+        RobotsView.as_view(in_db=True, objects=CustomPage.objects.filter(slug='robots.txt'))\n+    ),\n     custom_page_url(r'^(?P<page>search)/$', views.Search.as_view()),\n     custom_page_url(r'^(?P<page>catalog)/$', cached_2h(views.CategoryTree.as_view())),\n     custom_page_url(r'^shop/(?P<page>order)/$', views.OrderPage.as_view()),\n", "issue": "Wrong QuerySet in RobotsView stb2\nCurrently it looks so `CustomPage.objects.filter(slug='robots')` and should be `.filter(slug='robots.txt')`\n", "before_files": [{"content": "from collections import OrderedDict\n\nfrom django.conf import settings\nfrom django.conf.urls import url, include\nfrom django.conf.urls.static import static\nfrom django.contrib.sitemaps.views import sitemap\nfrom django.views.decorators.cache import cache_page\n\nfrom pages.views import RobotsView, SitemapPage\nfrom pages.urls import custom_page_url\n\nfrom shopelectro import sitemaps, config, views\nfrom shopelectro.admin import se_admin\n\n# Orders sitemaps instances\nsitemaps = OrderedDict([\n    ('index', sitemaps.IndexSitemap),\n    ('category', sitemaps.CategorySitemap),\n    ('category-with-tags', sitemaps.CategoryWithTagsSitemap),\n    ('products', sitemaps.ProductSitemap),\n    ('site', sitemaps.PagesSitemap)\n])\n\n# disable cache\nif settings.DEBUG:\n    def cache_page(arg):  # Ignore PyFlakesBear\n        if callable(arg):\n            return arg\n        return cache_page\n\ncached_60d = cache_page(config.cached_time(days=60))\ncached_2h = cache_page(config.cached_time(hours=2))\n\nadmin_urls = [\n    url(r'^', se_admin.urls),\n    url(r'^autocomplete/$', views.AdminAutocomplete.as_view(), name='admin_autocomplete'),\n    url(r'^get-tree-items/$', views.Tree.as_view()),\n    url(r'^redirect-to-product/$', views.RedirectToProduct.as_view()),\n    url(r'^table-editor-api/$', views.TableEditorAPI.as_view()),\n    url(r'^select2/', include('django_select2.urls')),\n]\n\ncatalog_urls = [\n    # \"category\" group\n    url(r'^categories/(?P<slug>[\\w-]+)/$',\n        cached_2h(views.CategoryPage.as_view()), name='category'),\n    url(r'^categories/(?P<slug>[\\w-]+)/tags/(?P<tags>[\\w-]+)/$',\n        cached_2h(views.CategoryPage.as_view()), name='category'),\n    url(r'^categories/(?P<slug>[\\w-]+)/(?P<sorting>[0-9]*)/$',\n        views.CategoryPage.as_view(), name='category'),\n    url(r'^categories/(?P<slug>[\\w-]+)/(?P<sorting>[0-9]*)/tags/(?P<tags>[\\w-]+)/$',\n        views.CategoryPage.as_view(), name='category'),\n    # \"load more\" group\n    url(r'categories/(?P<category_slug>[\\w-]+)/load-more/'\n        r'(?P<offset>[0-9]+)/(?P<sorting>[0-9]*)/$',\n        views.load_more, name='load_more'),\n    url(r'categories/(?P<category_slug>[\\w-]+)/load-more/'\n        r'(?P<offset>[0-9]+)/(?P<sorting>[0-9]*)/tags/(?P<tags>[\\w-]+)/$',\n        views.load_more, name='load_more'),\n    # rest of urls\n    url(r'^no-images/$', views.ProductsWithoutImages.as_view(),\n        name='products_without_images'),\n    url(r'^no-text/$', views.ProductsWithoutText.as_view(),\n        name='products_without_text'),\n    url(r'^products/(?P<product_vendor_code>[0-9]+)/$',\n        views.ProductPage.as_view(), name='product'),\n]\n\nservice_urls = [\n    url(r'^ya-kassa/aviso/$', views.yandex_aviso, name='yandex_aviso'),\n    url(r'^ya-kassa/check/$', views.yandex_check, name='yandex_check'),\n    url(r'^ya-feedback/redirect/$',\n        views.ya_feedback_with_redirect, name='ya_feedback_with_redirect'),\n    url(r'^ya-feedback/request/$',\n        views.ya_feedback_request, name='ya_feedback_request'),\n]\n\nsearch_urls = [\n    url(r'^autocomplete/$', views.Autocomplete.as_view(), name='autocomplete'),\n]\n\necommerce_urls = [\n    url(r'^cart-add/$', views.AddToCart.as_view(), name='cart_add'),\n    url(r'^cart-change/$', views.ChangeCount.as_view(), name='cart_set_count'),\n    url(r'^cart-flush/$', views.FlushCart.as_view(), name='cart_flush'),\n    url(r'^cart-remove/$', views.RemoveFromCart.as_view(), name='cart_remove'),\n    url(r'^order-call/$', views.order_call),\n    url(r'^one-click-buy/$', views.one_click_buy),\n    url(r'^yandex-order/$', views.YandexOrder.as_view()),\n    url(r'', include('ecommerce.urls')),\n]\n\ncustom_pages = [\n    custom_page_url(r'^(?P<page>)$', cached_2h(views.IndexPage.as_view())),\n    custom_page_url(r'^(?P<page>robots\\.txt)$', RobotsView.as_view(in_db=True)),\n    custom_page_url(r'^(?P<page>search)/$', views.Search.as_view()),\n    custom_page_url(r'^(?P<page>catalog)/$', cached_2h(views.CategoryTree.as_view())),\n    custom_page_url(r'^shop/(?P<page>order)/$', views.OrderPage.as_view()),\n    custom_page_url(r'^shop/(?P<page>order-success)/$', views.OrderSuccess.as_view()),\n    custom_page_url(r'^(?P<page>sitemap)/$', SitemapPage.as_view()),\n]\n\nurlpatterns = [\n    url('', include(custom_pages)),\n    url(r'^admin/', include(admin_urls)),\n    url(r'^catalog/', include(catalog_urls)),\n    url(r'^pages/', include('pages.urls')),\n    url(r'^save-feedback/$', views.save_feedback),\n    url(r'^delete-feedback/$', views.delete_feedback),\n    url(r'^set-view-type/$', views.set_view_type, name='set_view_type'),\n    url(r'^shop/', include(ecommerce_urls)),\n    url(r'^search/', include(search_urls)),\n    url(r'^service/', include(service_urls)),\n    url(r'^sitemap\\.xml$', cached_60d(sitemap), {'sitemaps': sitemaps}, name='sitemap'),\n]\n\nif settings.DEBUG:\n    import debug_toolbar\n\n    urlpatterns += [\n        url(r'^__debug__/', include(debug_toolbar.urls)),\n        *static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),\n        *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),\n    ]\n", "path": "shopelectro/urls.py"}], "after_files": [{"content": "from collections import OrderedDict\n\nfrom django.conf import settings\nfrom django.conf.urls import url, include\nfrom django.conf.urls.static import static\nfrom django.contrib.sitemaps.views import sitemap\nfrom django.views.decorators.cache import cache_page\n\nfrom pages.models import CustomPage\nfrom pages.views import RobotsView, SitemapPage\nfrom pages.urls import custom_page_url\n\nfrom shopelectro import sitemaps, config, views\nfrom shopelectro.admin import se_admin\n\n# Orders sitemaps instances\nsitemaps = OrderedDict([\n    ('index', sitemaps.IndexSitemap),\n    ('category', sitemaps.CategorySitemap),\n    ('category-with-tags', sitemaps.CategoryWithTagsSitemap),\n    ('products', sitemaps.ProductSitemap),\n    ('site', sitemaps.PagesSitemap)\n])\n\n# disable cache\nif settings.DEBUG:\n    def cache_page(arg):  # Ignore PyFlakesBear\n        if callable(arg):\n            return arg\n        return cache_page\n\ncached_60d = cache_page(config.cached_time(days=60))\ncached_2h = cache_page(config.cached_time(hours=2))\n\nadmin_urls = [\n    url(r'^', se_admin.urls),\n    url(r'^autocomplete/$', views.AdminAutocomplete.as_view(), name='admin_autocomplete'),\n    url(r'^get-tree-items/$', views.Tree.as_view()),\n    url(r'^redirect-to-product/$', views.RedirectToProduct.as_view()),\n    url(r'^table-editor-api/$', views.TableEditorAPI.as_view()),\n    url(r'^select2/', include('django_select2.urls')),\n]\n\ncatalog_urls = [\n    # \"category\" group\n    url(r'^categories/(?P<slug>[\\w-]+)/$',\n        cached_2h(views.CategoryPage.as_view()), name='category'),\n    url(r'^categories/(?P<slug>[\\w-]+)/tags/(?P<tags>[\\w-]+)/$',\n        cached_2h(views.CategoryPage.as_view()), name='category'),\n    url(r'^categories/(?P<slug>[\\w-]+)/(?P<sorting>[0-9]*)/$',\n        views.CategoryPage.as_view(), name='category'),\n    url(r'^categories/(?P<slug>[\\w-]+)/(?P<sorting>[0-9]*)/tags/(?P<tags>[\\w-]+)/$',\n        views.CategoryPage.as_view(), name='category'),\n    # \"load more\" group\n    url(r'categories/(?P<category_slug>[\\w-]+)/load-more/'\n        r'(?P<offset>[0-9]+)/(?P<sorting>[0-9]*)/$',\n        views.load_more, name='load_more'),\n    url(r'categories/(?P<category_slug>[\\w-]+)/load-more/'\n        r'(?P<offset>[0-9]+)/(?P<sorting>[0-9]*)/tags/(?P<tags>[\\w-]+)/$',\n        views.load_more, name='load_more'),\n    # rest of urls\n    url(r'^no-images/$', views.ProductsWithoutImages.as_view(),\n        name='products_without_images'),\n    url(r'^no-text/$', views.ProductsWithoutText.as_view(),\n        name='products_without_text'),\n    url(r'^products/(?P<product_vendor_code>[0-9]+)/$',\n        views.ProductPage.as_view(), name='product'),\n]\n\nservice_urls = [\n    url(r'^ya-kassa/aviso/$', views.yandex_aviso, name='yandex_aviso'),\n    url(r'^ya-kassa/check/$', views.yandex_check, name='yandex_check'),\n    url(r'^ya-feedback/redirect/$',\n        views.ya_feedback_with_redirect, name='ya_feedback_with_redirect'),\n    url(r'^ya-feedback/request/$',\n        views.ya_feedback_request, name='ya_feedback_request'),\n]\n\nsearch_urls = [\n    url(r'^autocomplete/$', views.Autocomplete.as_view(), name='autocomplete'),\n]\n\necommerce_urls = [\n    url(r'^cart-add/$', views.AddToCart.as_view(), name='cart_add'),\n    url(r'^cart-change/$', views.ChangeCount.as_view(), name='cart_set_count'),\n    url(r'^cart-flush/$', views.FlushCart.as_view(), name='cart_flush'),\n    url(r'^cart-remove/$', views.RemoveFromCart.as_view(), name='cart_remove'),\n    url(r'^order-call/$', views.order_call),\n    url(r'^one-click-buy/$', views.one_click_buy),\n    url(r'^yandex-order/$', views.YandexOrder.as_view()),\n    url(r'', include('ecommerce.urls')),\n]\n\ncustom_pages = [\n    custom_page_url(r'^(?P<page>)$', cached_2h(views.IndexPage.as_view())),\n    custom_page_url(\n        r'^(?P<page>robots\\.txt)$',\n        RobotsView.as_view(in_db=True, objects=CustomPage.objects.filter(slug='robots.txt'))\n    ),\n    custom_page_url(r'^(?P<page>search)/$', views.Search.as_view()),\n    custom_page_url(r'^(?P<page>catalog)/$', cached_2h(views.CategoryTree.as_view())),\n    custom_page_url(r'^shop/(?P<page>order)/$', views.OrderPage.as_view()),\n    custom_page_url(r'^shop/(?P<page>order-success)/$', views.OrderSuccess.as_view()),\n    custom_page_url(r'^(?P<page>sitemap)/$', SitemapPage.as_view()),\n]\n\nurlpatterns = [\n    url('', include(custom_pages)),\n    url(r'^admin/', include(admin_urls)),\n    url(r'^catalog/', include(catalog_urls)),\n    url(r'^pages/', include('pages.urls')),\n    url(r'^save-feedback/$', views.save_feedback),\n    url(r'^delete-feedback/$', views.delete_feedback),\n    url(r'^set-view-type/$', views.set_view_type, name='set_view_type'),\n    url(r'^shop/', include(ecommerce_urls)),\n    url(r'^search/', include(search_urls)),\n    url(r'^service/', include(service_urls)),\n    url(r'^sitemap\\.xml$', cached_60d(sitemap), {'sitemaps': sitemaps}, name='sitemap'),\n]\n\nif settings.DEBUG:\n    import debug_toolbar\n\n    urlpatterns += [\n        url(r'^__debug__/', include(debug_toolbar.urls)),\n        *static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),\n        *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),\n    ]\n", "path": "shopelectro/urls.py"}]}