2👍
Ok, so I found by chance(almost) another post, this one: Getting stuck at Django error: No module named registration
and thought it might have something to do with pythonpath.
so then I tried easy_install, like suggested:
$ easy_install -Z django-crispy-forms
Searching for django-crispy-forms
Best match: django-crispy-forms 1.4.0
Adding django-crispy-forms 1.4.0 to easy-install.pth file
Using /home/nr1/Envs/abc/lib/python2.7/site-packages
Processing dependencies for django-crispy-forms
Finished processing dependencies for django-crispy-forms
Now it works!
I still think there might be something missing with the pythonpath, because I keep getting this in eclipse:
SignUpView Found at: __module_not_in_the_pythonpath__
, and I would like someone to clarify it, so feel free to contribute here…
but django and crispy_forms now works together. YippikayeyMF!!
31👍
I solved this problem right now, I realized that the crispy-form installed version was the python 2.7 version, but I’m using Django-1.10 with Python 3.5, and I think this is your problem too.
Try: pip3 install --user django-crispy-forms
- [Django]-Django-rest-framework: api versioning
- [Django]-How to Query model where name contains any word in python list?
- [Django]-How do I tell if a Django QuerySet has been evaluated?
19👍
You have to make sure that you install crispy-forms into the virtualenv.
- Activate VirtualEnv (where env is the directory/name of your virtual environment):
source env/bin/activate
- Install crispy-forms
pip install django-crispy-forms
- [Django]-Django: display time it took to load a page on every page
- [Django]-How to filter objects for count annotation in Django?
- [Django]-Django Cannot set values on a ManyToManyField which specifies an intermediary model. Use Manager instead
12👍
As per the documentation : http://django-crispy-forms.readthedocs.org/en/latest/install.html#installing-django-crispy-forms, you have to add ‘crispy_forms’ not ‘crispy-forms’ to your Installed Apps list.
- [Django]-Good open source django project for learning
- [Django]-Django date to javascript at the template
- [Django]-You are trying to add a non-nullable field 'new_field' to userprofile without a default
7👍
I was using crispy-forms
instead of crispy_forms
in settings.py
Following is the overview of things to be done to get crispy forms working:
pip install django-crispy-forms
in settings.py installed apps add crispy_forms
In settings.py add CRISPY_TEMPLATE_PACK = 'bootstrap4'
- [Django]-Twisted server crashes unexpectedly while running django
- [Django]-Customizing an Admin form in Django while also using autodiscover
- [Django]-How to add an HTTP header to all Django responses
3👍
I came across the same problem and figured out an alternate way around.
- Exit Virtualenv.
- Do a fresh pip install of crispy form at the root directory.
- Go back to Virtualenv and make migrations followed by migrate.
I think the django installation needs that all third party app be installed inside and as well outside the virtual env.
I would really appreciate if someone could help me with inside details behind the reason.
- [Django]-How do I package a python application to make it pip-installable?
- [Django]-(13: Permission denied) while connecting to upstream:[nginx]
- [Django]-How can I save my secret keys and password securely in my version control system?
2👍
I use PyCharm for my Django projects. I get exactly the same error as you but in PyCharm until I change the Python interpreter used by PyCharm for the project. I have to, for each project, select the Python interpreter that resides in the relevant virtalenv folder to get the IDE (PyCharm) to recognize the installed modules. I suspect that the Pythonpath lurks somewhere in the background…
Doesn’t Eclipse allow you to select the interpreter to use for a project? That’s where I’d start looking.
Good luck!
- [Django]-What is pip install -q -e . for in this Travis-CI build tutorial?
- [Django]-Django Sessions
- [Django]-How to customize default auth login form in Django?
2👍
This helped me. Try to use pipenv as a development environment.
-
Install pipenv via pip
pip3 install --user pipenv
-
Install packages you need
pipenv install django-crispy-forms
-
Run pipenv shell
pipenv shell
-
Run your server
pipenv run python3 manage.py runserver
- [Django]-What are the differences between django-tastypie and djangorestframework?
- [Django]-Django: Filtering by %filter% not allowed
- [Django]-Django – how to make ImageField/FileField optional?
1👍
All the above answers are missing one thing. Please cross check the location of your ‘External Libraries’ on the drive first before you do any of the above advises.
Reason:
– You be using an IDE that points to a different python directory, that is for guys who have install python more than once.
- don’t think your ‘virtualenv’ is pointing to the right directory were your ‘External Libraries’ are stored. So if you go ahead and install in a wrong directory then such error will ok
- [Django]-Django debug display all variables of a page
- [Django]-Proper way to bulk_create for ManyToMany field, Django?
- [Django]-Django – How to track if a user is online/offline in realtime?
- [Django]-Adding to the "constructor" of a django model
- [Django]-Trying to trace a circular import error in Django
- [Django]-Django query annotation with boolean field
1👍
After activating your virtual environment, assuming you are using python version 3, try:
python3 -m pip install django-crispy-forms
- [Django]-How can I perform Django's `syncdb –noinput` with call_command?
- [Django]-Add request.GET variable using django.shortcuts.redirect
- [Django]-Celery Flower Security in Production
0👍
Your django project is looking for crispy forms module.There is a possibility that it was not installed earlier possibly due to different versions.
If you are using a virtual environment i recommend that after activating your virtual environment you need to install django -crispy-forms.
To install it use command:
pip install django-crispy-forms
- [Django]-How to See if a String Contains Another String in Django Template
- [Django]-Must be owner of relation django_site when manage.py migrate
- [Django]-Django 1.5b1: executing django-admin.py causes "No module named settings" error
0👍
I had this same error and all I had to do was runserver using
python3 manage.py runserver
. I’m not sure how it works but I think some modules need you to explicitly call python3 and not just the alias.
- [Django]-Timestamp fields in django
- [Django]-How to gracefully restart django running fcgi behind nginx?
- [Django]-Compound/Composite primary/unique key with Django
0👍
I just solved this problem, couldn’t find the solution anywhere though.
This error shows if you haven’t configured the crispy-forms correctly, and do check the version you are using.
Another one that worked for me- I configured everything perfect, But didn’t noticed some minor issues with the project and the app I configured.
Go through the whole process again and everything will be good to go.
- [Django]-Foreignkey (user) in models
- [Django]-How can I disable logging while running unit tests in Python Django?
- [Django]-How to get an ImageField URL within a template?
0👍
For me , I just had to update the python version and it solved the problem. I was using python 3.9 , but then I uninstalled it and installed python 3.10 and also installed the latest version of django after uninstalling the previous version.
Note : don’t forget to change your environment variables after making the changes!
- [Django]-Django 1.10.1 'my_templatetag' is not a registered tag library. Must be one of:
- [Django]-Can someone explain how contribute_to_class works?
- [Django]-Creating an app on Heroku with Django and NPM
0👍
After pip installed the crispy-forms library, added crispy_forms in the installed_apps. The issue for me was at the forms.py, my VScode editor does not recognized the crispy_forms.helper. Solution – I just close my Editor and then open again and now its recognized.
- [Django]-Sending HTML email in django
- [Django]-How to disable formatting for FloatField in template for Django
- [Django]-Django error message "Add a related_name argument to the definition"
0👍
I had a similar issue, and I solved it by this:
- activate your virtual environment
- uninstall crispy forms with "pip3 uninstall django-crispy-forms"
- reinstall crispy forms, but this time use "sudo pip3 install django-crispy-forms"
- retest, and see if it works for you.
The terminal will display a warning message about using sudo with pip, but you can safely disregard it.
- [Django]-Django templates: verbose version of a choice
- [Django]-How to migrate back from initial migration in Django 1.7?
- [Django]-Django: Implementing a Form within a generic DetailView
0👍
I had the same problem and depending on your set up I have found that the following actions solved my problem.
-
Using
python3 manage.py runserver
instead ofpython manage.py runserver
(which kept giving me an error. -
The docs here specify a bit more of what you’ll need to do if using the bootstrap template. https://django-crispy-forms.readthedocs.io/en/latest/install.html#template-packs
To be more specific for me I followed these instructions here: https://pypi.org/project/crispy-bootstrap4/
After these adjustments, everything worked just fine.
- [Django]-Using Django Managers vs. staticmethod on Model class directly
- [Django]-Django return redirect() with parameters
- [Django]-Using Firebase Auth with Django