Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve keyword 'name' when searching forum_permission in admin interface #79

Closed
martinburchell opened this issue Aug 9, 2017 · 1 comment

Comments

@martinburchell
Copy link
Contributor

I'm using the vanilla project
If I search for anything in the forum_permission changelist, I get the error below. I get similar errors when searching in /admin/forum_permission/userforumpermission/ and /admin/forum_permission/groupforumpermission/

Environment:


Request Method: GET
Request URL: http://localhost:8000/admin/forum_permission/forumpermission/?q=hello

Django Version: 1.11.4
Python Version: 2.7.6
Installed Applications:
[u'django.contrib.auth',
 u'django.contrib.contenttypes',
 u'django.contrib.sessions',
 u'django.contrib.sites',
 u'django.contrib.messages',
 u'django.contrib.staticfiles',
 u'django.contrib.admin',
 u'haystack',
 u'mptt',
 u'widget_tweaks',
 u'machina',
 u'machina.apps.forum',
 u'machina.apps.forum_conversation',
 u'machina.apps.forum_conversation.forum_attachments',
 u'machina.apps.forum_conversation.forum_polls',
 u'machina.apps.forum_feeds',
 u'machina.apps.forum_moderation',
 u'machina.apps.forum_search',
 u'machina.apps.forum_tracking',
 u'machina.apps.forum_member',
 u'machina.apps.forum_permission',
 u'vanilla']
Installed Middleware:
(u'django.contrib.sessions.middleware.SessionMiddleware',
 u'django.middleware.common.CommonMiddleware',
 u'django.middleware.csrf.CsrfViewMiddleware',
 u'django.contrib.auth.middleware.AuthenticationMiddleware',
 u'django.contrib.messages.middleware.MessageMiddleware',
 u'django.middleware.clickjacking.XFrameOptionsMiddleware',
 u'machina.apps.forum_permission.middleware.ForumPermissionMiddleware')



Traceback:

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  551.                 return self.admin_site.admin_view(view)(*args, **kwargs)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  224.             return view(request, *args, **kwargs)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  67.             return bound_func(*args, **kwargs)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  63.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in changelist_view
  1542.                 self.list_max_show_all, self.list_editable, self,

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/contrib/admin/views/main.py" in __init__
  78.         self.queryset = self.get_queryset(request)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/contrib/admin/views/main.py" in get_queryset
  351.         qs, search_use_distinct = self.model_admin.get_search_results(request, qs, self.query)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in get_search_results
  910.                 queryset = queryset.filter(reduce(operator.or_, or_queries))

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/db/models/query.py" in filter
  784.         return self._filter_or_exclude(False, *args, **kwargs)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/db/models/query.py" in _filter_or_exclude
  802.             clone.query.add_q(Q(*args, **kwargs))

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/db/models/sql/query.py" in add_q
  1250.         clause, _ = self._add_q(q_object, self.used_aliases)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/db/models/sql/query.py" in _add_q
  1270.                     current_negated, allow_joins, split_subq)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/db/models/sql/query.py" in _add_q
  1276.                     allow_joins=allow_joins, split_subq=split_subq,

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/db/models/sql/query.py" in build_filter
  1154.         lookups, parts, reffed_expression = self.solve_lookup_type(arg)

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/db/models/sql/query.py" in solve_lookup_type
  1034.         _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())

File "/path/to/my/project/django/website/.ve/local/lib/python2.7/site-packages/django/db/models/sql/query.py" in names_to_path
  1352.                                      "Choices are: %s" % (name, ", ".join(available)))

Exception Type: FieldError at /admin/forum_permission/forumpermission/
Exception Value: Cannot resolve keyword 'name' into field. Choices are: codename, groupforumpermission, id, is_global, is_local, userforumpermission

@ellmetha
Copy link
Owner

Hi! Thanks for reporting this! This has been fixed in 3c514c8. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants