openedx / openedx/django-config-models
module 'django.contrib.admin' has no attribute 'display'
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Python: 3.8
Django: 3.1.14
After upgrading from v2.3.0 to v2.4.0, started getting this exception on python manage.py migrate command:
Traceback (most recent call last):
File "manage.py", line 25, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
django.setup()
File "/usr/local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
app_config.ready()
File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/apps.py", line 24, in ready
self.module.autodiscover()
File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/__init__.py", line 24, in autodiscover
autodiscover_modules('admin', register_to=site)
File "/usr/local/lib/python3.8/site-packages/django/utils/module_loading.py", line 47, in autodiscover_modules
import_module('%s.%s' % (app_config.name, module_to_search))
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/saleor/.local/lib/python3.8/site-packages/config_models/admin.py", line 152, in <module>
class KeyedConfigurationModelAdmin(ConfigurationModelAdmin):
File "/home/saleor/.local/lib/python3.8/site-packages/config_models/admin.py", line 202, in KeyedConfigurationModelAdmin
@admin.display(
AttributeError: module 'django.contrib.admin' has no attribute 'display'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with Python 3.8, Django 3.1.14, and the v2.4.0 package by running python manage.py migrate. Start with config_models/admin.py around the KeyedConfigurationModelAdmin definition and its @admin.display usage; done means application setup completes without this AttributeError and migration can proceed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100