FieldError at /admin/base/course/
Summary
Quand on va dans la partie admin (django-admin) et qu'on veut editer un cours (courses), la page tombe en erreur.
FieldError at /admin/base/course/
Cannot resolve keyword 'groupe' into field. Choices are: avoidbothslots, basic, children_groups, course, display, groupcost, groupfreehalfday, id, limitedroomchoices, limitedslotchoices, minhalfdays, nom, parent_groups, reasonabledays, size, stabilize, student, train_prog, train_prog_id, type, type_id
Steps to reproduce
Installation en suivant la procédure:
- git clone
- make start
- make init
Example Project
?
What is the current bug behavior?
Je ne sais pas comment éditer les cours. La page d'admin sur les cours plante.
What is the expected correct behavior?
Edition des cours possible.
Relevant logs and/or screenshots
Environment:
Request Method: GET
Request URL: http://192.168.2.69:8000/admin/base/course/
Django Version: 2.1.1
Python Version: 3.7.0
Installed Applications:
['channels',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'import_export',
'colorfield',
'base',
'TTapp',
'quote',
'people',
'solve_board']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/query.py" in add_fields
1732. join_info = self.setup_joins(name.split(LOOKUP_SEP), opts, alias, allow_many=allow_m2m)
File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/query.py" in setup_joins
1473. names[:pivot], opts, allow_many, fail_on_missing=True,
File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/query.py" in names_to_path
1389. "Choices are: %s" % (name, ", ".join(available)))
During handling of the above exception (Cannot resolve keyword 'groupe' into field. Choices are: avoidbothslots, basic, children_groups, course, display, groupcost, groupfreehalfday, id, limitedroomchoices, limitedslotchoices, minhalfdays, nom, parent_groups, reasonabledays, size, stabilize, student, train_prog, train_prog_id, type, type_id), another exception occurred:
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
126. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py" in _get_response
124. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.7/site-packages/django/contrib/admin/options.py" in wrapper
604. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/contrib/admin/sites.py" in inner
223. return view(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapper
45. return bound_method(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/utils/decorators.py" in _wrapped_view
142. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/django/contrib/admin/options.py" in changelist_view
1674. cl = self.get_changelist_instance(request)
File "/usr/local/lib/python3.7/site-packages/django/contrib/admin/options.py" in get_changelist_instance
742. sortable_by,
File "/usr/local/lib/python3.7/site-packages/django/contrib/admin/views/main.py" in __init__
80. self.queryset = self.get_queryset(request)
File "/usr/local/lib/python3.7/site-packages/django/contrib/admin/views/main.py" in get_queryset
359. filters_use_distinct) = self.get_filters(request)
File "/usr/local/lib/python3.7/site-packages/django/contrib/admin/views/main.py" in get_filters
134. self.model, self.model_admin, field_path=field_path,
File "/usr/local/lib/python3.7/site-packages/django/contrib/admin/filters.py" in __init__
381. self.lookup_choices = queryset.distinct().order_by(field.name).values_list(field.name, flat=True)
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py" in values_list
777. clone = self._values(*_fields, **expressions)
File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py" in _values
745. clone.query.set_values(fields)
File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/query.py" in set_values
1984. self.add_fields(field_names, True)
File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/query.py" in add_fields
1755. "Choices are: %s" % (name, ", ".join(names)))
Exception Type: FieldError at /admin/base/course/
Exception Value: Cannot resolve keyword 'groupe' into field. Choices are: avoidbothslots, basic, children_groups, course, display, groupcost, groupfreehalfday, id, limitedroomchoices, limitedslotchoices, minhalfdays, nom, parent_groups, reasonabledays, size, stabilize, student, train_prog, train_prog_id, type, type_id