django-cms / djangocms-alias

Other
8 stars 23 forks source link

GrouperModelAdmin issues: ModuleNotFoundError: No module named 'cms.admin.utils' #178

Closed andrewhayes1979 closed 6 months ago

andrewhayes1979 commented 1 year ago

Hi

I've just re-synced my virtualenv that's pulling in master of this component.

Noticed in this github you've pushed something 1 hour ago to do with GrouperAdmin

I'm now getting this when starting my application:

Traceback (most recent call last):
  File "/Users/ahayes/Sites/consoles/.venv/lib/python3.9/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/Users/ahayes/Sites/consoles/.venv/lib/python3.9/site-packages/django/contrib/admin/apps.py", line 27, in ready
    self.module.autodiscover()
  File "/Users/ahayes/Sites/consoles/.venv/lib/python3.9/site-packages/django/contrib/admin/__init__.py", line 24, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/Users/ahayes/Sites/consoles/.venv/lib/python3.9/site-packages/django/utils/module_loading.py", line 47, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/ahayes/Sites/consoles/.venv/src/djangocms-alias/djangocms_alias/admin.py", line 12, in <module>
    from cms.admin.utils import GrouperModelAdmin
ModuleNotFoundError: No module named 'cms.admin.utils'

...my requirements.txt lists django-cms==4.1.0rc1 as the CMS version in the requirements, which is higher than the version listed in setup.py of this component.

...am I doing something wrong?

Pinning to the previous release in the interim

marksweb commented 1 year ago

I need to move this project on to 4.1rc3 and update djangocms-versioning, but this requires the fix in https://github.com/django-cms/djangocms-versioning/pull/333

fsbraun commented 1 year ago

djangocms-alias now requires django-cms>=4.1.0rc3. The above mentioned fix is merged. So you should be ready to go.