Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't customise my Django forms using widget tweaks for an app

I installed pip3, installed Django-widget-tweaks and add widget_tweaks in INSTALLED_APPS[] in settings.py.

When I run the server, I'm getting the error:

-ImportError: No module named 'widget_tweaks'

error image

like image 451
Anas P H Avatar asked Nov 08 '22 06:11

Anas P H


1 Answers

It is possible that the pip3 script has installed django-widget-tweaks into a different version of Python than the one you're using to run Django. You may have multiple versions of Python 3 installed on your machine.

Try installing django-widget-tweaks using the same version of Python that you're using to run Django:

/path/to/python -m pip install django-widget-tweaks

Obviously make sure /path/to/python is the version you're using to start the Django server.

like image 109
Will Keeling Avatar answered Nov 14 '22 18:11

Will Keeling