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

ModuleNotFoundError: No module named 'django.contrib.admin.templatetags.admin_static' #759

Closed
agusmakmun opened this issue May 21, 2020 · 11 comments

Comments

@agusmakmun
Copy link

I'm trying to install this django==suit-0.2.28 for django==3.0.5, but I have an error.

ModuleNotFoundError: No module named 'django.contrib.admin.templatetags.admin_static'

I recomended you to support multiple django versions;

try:
    from django.contrib.admin.templatetags.admin_static import static
except ImportError:
    from django.templatetags.static import static
(env-siap) ➜  siap-backend git:(versioning) pip install django-suit
Collecting django-suit
  Downloading django_suit-0.2.28-py2.py3-none-any.whl (402 kB)
     |████████████████████████████████| 402 kB 3.6 kB/s 
Installing collected packages: django-suit
Successfully installed django-suit-0.2.28
(env-siap) ➜  siap-backend git:(versioning) ✗ ./manage.py collectstatic
Traceback (most recent call last):
  File "./manage.py", line 21, in <module>
    main()
  File "./manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/django/contrib/admin/apps.py", line 24, in ready
    self.module.autodiscover()
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/django/contrib/admin/__init__.py", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/django/utils/module_loading.py", line 47, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/home/agus/envs/env-siap/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/suit/admin.py", line 8, in <module>
    from suit.widgets import NumberInput, SuitSplitDateTimeWidget
  File "/home/agus/envs/env-siap/lib/python3.7/site-packages/suit/widgets.py", line 6, in <module>
    from django.contrib.admin.templatetags.admin_static import static
ModuleNotFoundError: No module named 'django.contrib.admin.templatetags.admin_static'
@mbrksntrk
Copy link

I'm trying to install this django==suit-0.2.28 for django==3.0.5, but I have an error.

same here,
Since django.contrib.staticfiles.templatetags was removed in version 3, i think suit doesn't support django 3.

@amureki
Copy link
Contributor

amureki commented Jun 22, 2020

Greetings fellows!

This was fixed in 3f96430#diff-2472dfd85537f7c91be3519330c6a40e but that commit is placed under v2 development branch (not released on PyPI):
https://github.com/darklow/django-suit/tree/v2

You can try to switch to this version by installing it via GitHub directly and see if it works for you:

pip install https://github.com/darklow/django-suit/tarball/v2

However, I am not sure if there is an active development happening ATM, last commit was on 10 Jan 2020.

@darklow do you think we can expect any movements soon?

Thanks!

@mbrksntrk
Copy link

mbrksntrk commented Jun 23, 2020

This was fixed in 3f96430#diff-2472dfd85537f7c91be3519330c6a40e but that commit is placed under v2 development branch (not released on PyPI):
https://github.com/darklow/django-suit/tree/v2

Thank you for your reply, I tried this, I works!

@thmsrmbld
Copy link

Hey @mbrksntrk - what was the process you took to install that specific commit from the working version? Would love to get this working my side.

@ladmerc2
Copy link

ladmerc2 commented Jul 4, 2020

@thmsrmbld pip install https://github.com/darklow/django-suit/tarball/v2

@thmsrmbld
Copy link

Ahh you installed the whole v2, awesome, thanks.

@jeevankc17
Copy link

How to install all version 3 ?

@asimejaz14
Copy link

Greetings fellows!

This was fixed in 3f96430#diff-2472dfd85537f7c91be3519330c6a40e but that commit is placed under v2 development branch (not released on PyPI):
https://github.com/darklow/django-suit/tree/v2

You can try to switch to this version by installing it via GitHub directly and see if it works for you.
However, I am not sure if there is an active development happening ATM, last commit was on 10 Jan 2020.

@darklow do you think we can expect any movements soon?

Thanks!

Worked perfectly, thanks!!!

@AliHassanUOS
Copy link

pip install https://github.com/darklow/django-suit/tarball/v2

install it for resolve this error

@AliHassanUOS
Copy link

@thmsrmbld pip install https://github.com/darklow/django-suit/tarball/v2

Thank You

@Khosiyat
Copy link

Khosiyat commented Nov 2, 2021

1111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111

Does anyone know solution for this problem, pls........?

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

9 participants