Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Sorting the attendee profiles by name doesn't work #1423

Open
malemburg opened this issue Jun 8, 2021 · 0 comments
Open

Sorting the attendee profiles by name doesn't work #1423

malemburg opened this issue Jun 8, 2021 · 0 comments

Comments

@malemburg
Copy link
Member

Example: https://ep2021.europython.eu/admin/conference/attendeeprofile/?o=3

Gives a traceback:

Internal Server Error: /admin/conference/attendeeprofile/

NoReverseMatch at /admin/conference/attendeeprofile/
Reverse for 'profile' with keyword arguments '{'profile_slug': ''}' not found. 1 pattern(s) tried: ['profiles/(?P<profile_slug>[\\w-]+)/$']

Traceback:

File "/usr/local/lib/python3.8/site-packages/django/db/models/options.py" in get_field
  565.             return self.fields_map[field_name]

During handling of the above exception ('_name'), another exception occurred:

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/utils.py" in lookup_field
  262.         f = _get_non_gfk_field(opts, name)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/utils.py" in _get_non_gfk_field
  293.     field = opts.get_field(name)

File "/usr/local/lib/python3.8/site-packages/django/db/models/options.py" in get_field
  567.             raise FieldDoesNotExist("%s has no field named '%s'" % (self.object_name, field_name))

During handling of the above exception (AttendeeProfile has no field named '_name'), another exception occurred:

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  145.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  143.                 response = response.render()

File "/usr/local/lib/python3.8/site-packages/django/template/response.py" in render
  106.             self.content = self.rendered_content

File "/usr/local/lib/python3.8/site-packages/django/template/response.py" in rendered_content
  83.         content = template.render(context, self._request)

File "/usr/local/lib/python3.8/site-packages/django/template/backends/django.py" in render
  61.             return self.template.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render
  171.                     return self._render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in _render
  163.         return self.nodelist.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py" in render
  62.                 result = block.nodelist.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/loader_tags.py" in render
  62.                 result = block.nodelist.render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/usr/local/lib/python3.8/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/templatetags/base.py" in render
  33.         return super().render(context)

File "/usr/local/lib/python3.8/site-packages/django/template/library.py" in render
  214.         _dict = self.func(*resolved_args, **resolved_kwargs)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py" in result_list
  339.         'results': list(results(cl)),

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py" in results
  315.             yield ResultList(None, items_for_result(cl, res, None))

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py" in __init__
  306.         super().__init__(*items)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/templatetags/admin_list.py" in items_for_result
  229.             f, attr, value = lookup_field(field_name, result, cl.model_admin)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/utils.py" in lookup_field
  271.             value = attr(obj)

File "/usr/local/lib/python3.8/site-packages/django/utils/safestring.py" in wrapped
  67.         return safety_marker(func(*args, **kwargs))

File "/usr/src/ep2021/p3/admin.py" in _name
  57.         url = reverse("profiles:profile", kwargs={"profile_slug": o.slug})

File "/usr/local/lib/python3.8/site-packages/django/urls/base.py" in reverse
  90.     return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))

File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py" in _reverse_with_prefix
  673.         raise NoReverseMatch(msg)

Exception Type: NoReverseMatch at /admin/conference/attendeeprofile/
Exception Value: Reverse for 'profile' with keyword arguments '{'profile_slug': ''}' not found. 1 pattern(s) tried: ['profiles/(?P<profile_slug>[\\w-]+)/$']
Request information:
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants