We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
project list does not show text if there are no matching projects
It should show something like "No projects could be found". Note that the text should work for two cases: "there are no projects" and "there are no projects matching the filters".

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `apps/contrib/templatetags/contrib_tags.py`
Content:
```
1 from django import template
2 from django.template.loader import render_to_string
3 
4 register = template.Library()
5 
6 
7 @register.assignment_tag
8 def include_template_string(template, **kwargs):
9     rendered_template = render_to_string(template, kwargs)
10     return str(rendered_template)
11 
12 
13 @register.assignment_tag
14 def combined_url_parameter(request_query_dict, **kwargs):
15     combined_query_dict = request_query_dict.copy()
16     for key in kwargs:
17         combined_query_dict.setlist(key, [kwargs[key]])
18     encoded_parameter = '?' + combined_query_dict.urlencode()
19     return encoded_parameter
20
```
--- 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/apps/contrib/templatetags/contrib_tags.py b/apps/contrib/templatetags/contrib_tags.py
--- a/apps/contrib/templatetags/contrib_tags.py
+++ b/apps/contrib/templatetags/contrib_tags.py
@@ -17,3 +17,14 @@
         combined_query_dict.setlist(key, [kwargs[key]])
     encoded_parameter = '?' + combined_query_dict.urlencode()
     return encoded_parameter
+
+
+@register.assignment_tag
+def filter_has_perm(perm, user, objects):
+    """Filter a list of objects based on user permissions."""
+    if not hasattr(user, 'has_perm'):
+        # If the swapped user model does not support permissions, all objects
+        # will be returned. This is taken from rules.templatetags.has_perm.
+        return objects
+    else:
+        return (obj for obj in objects if user.has_perm(perm, obj))

{"golden_diff": "diff --git a/apps/contrib/templatetags/contrib_tags.py b/apps/contrib/templatetags/contrib_tags.py\n--- a/apps/contrib/templatetags/contrib_tags.py\n+++ b/apps/contrib/templatetags/contrib_tags.py\n@@ -17,3 +17,14 @@\n         combined_query_dict.setlist(key, [kwargs[key]])\n     encoded_parameter = '?' + combined_query_dict.urlencode()\n     return encoded_parameter\n+\n+\n+@register.assignment_tag\n+def filter_has_perm(perm, user, objects):\n+    \"\"\"Filter a list of objects based on user permissions.\"\"\"\n+    if not hasattr(user, 'has_perm'):\n+        # If the swapped user model does not support permissions, all objects\n+        # will be returned. This is taken from rules.templatetags.has_perm.\n+        return objects\n+    else:\n+        return (obj for obj in objects if user.has_perm(perm, obj))\n", "issue": "project list does not show text if there are no matching projects\nIt should show something like \"No projects could be found\". Note that the text should work for two cases: \"there are no projects\" and \"there are no projects matching the filters\".\n", "before_files": [{"content": "from django import template\nfrom django.template.loader import render_to_string\n\nregister = template.Library()\n\n\n@register.assignment_tag\ndef include_template_string(template, **kwargs):\n    rendered_template = render_to_string(template, kwargs)\n    return str(rendered_template)\n\n\n@register.assignment_tag\ndef combined_url_parameter(request_query_dict, **kwargs):\n    combined_query_dict = request_query_dict.copy()\n    for key in kwargs:\n        combined_query_dict.setlist(key, [kwargs[key]])\n    encoded_parameter = '?' + combined_query_dict.urlencode()\n    return encoded_parameter\n", "path": "apps/contrib/templatetags/contrib_tags.py"}], "after_files": [{"content": "from django import template\nfrom django.template.loader import render_to_string\n\nregister = template.Library()\n\n\n@register.assignment_tag\ndef include_template_string(template, **kwargs):\n    rendered_template = render_to_string(template, kwargs)\n    return str(rendered_template)\n\n\n@register.assignment_tag\ndef combined_url_parameter(request_query_dict, **kwargs):\n    combined_query_dict = request_query_dict.copy()\n    for key in kwargs:\n        combined_query_dict.setlist(key, [kwargs[key]])\n    encoded_parameter = '?' + combined_query_dict.urlencode()\n    return encoded_parameter\n\n\n@register.assignment_tag\ndef filter_has_perm(perm, user, objects):\n    \"\"\"Filter a list of objects based on user permissions.\"\"\"\n    if not hasattr(user, 'has_perm'):\n        # If the swapped user model does not support permissions, all objects\n        # will be returned. This is taken from rules.templatetags.has_perm.\n        return objects\n    else:\n        return (obj for obj in objects if user.has_perm(perm, obj))\n", "path": "apps/contrib/templatetags/contrib_tags.py"}]}