I want to start a project but when trying to makemigrations, I got ModuleNotFoundError even if my apps is "installed" in settings
I have 2 apps: authentication and blog
In authentication, I have override User model with AbstractUser and that all
Python 3.8.3 / Django 3.2.3
I've try to re-install librairies in my virtual env but doesn't works
I have checked for typ errors but there are no errors
whats is wrong?
Related
I was working on a Django project in version 2.0, but my client was unhappy about it as he wants that project to be made with Django 1.1.3. So, I switched back to old version and tried to setup the project on that version but was unable to do so.
After that, I created a new project in Django 1.1.3 and created a Django app too. I tried to run command python manage.py syncdb but I got this error message:
Error: No module named messages
What's the issue? I am not able to find Django 1.1.3 documentation on this.
The module django.contrib.messages is available only for Django versions >= 1.2, unfortunately.
You could maybe convince your client to switch to 1.2.X, or write your own messages as part of your server's responses, and create your own client-side message renderer.
Tried to install django-userena, and when launching
python manage.py startapp polls
I get the userena.compat.SiteProfileNotAvailable error.
So this is very odd.
First of all, official Django docs claims to depricate AUTH_PROFILE_MODULE setting : https://docs.djangoproject.com/en/1.7/releases/1.7/.
But /usr/local/lib/python2.7/dist-packages/userena/utils.py raises this error if it can't find AUTH_PROFILE_MODULE setting. Does it mean I can't use userena unless I downgrade to versions 1.6 or lower?
Secondly, I haven't created any models yet, so which profile I should have been addressing when starting app?
Django version 1.7.7, userena - 1.4.0
I solved the problem by uninstalling userena, creating accounts app, editing accounts/models.py file and only then installing userena.
Worked out perfectly
I am using django-review package with one of my application where i am using the custom user model for Authentication. I have installed the django-review in my virtual environment and added the review app in my Installed_APPS as it is described in the documents of package.
but when i am running ./manage.py migrate review i am getting an error that django.db.utils.ProgrammingError: relation "review_review" does not exist
i did everythin same as it is defined in django-review package documents.
I am using django Version 1.6.5
You don't seem to have run ./manage.py migrate (or ./manage.py syncdb on earlier Django versions).
I am working on a django app and was using south for migrations. Everything worked well in my system and I was able to migrate. But when I put the code in the server and ran syncdb, I got the error as:
#After a long traceback
from django.db.models.loading import cache
Import Error: no module named cache
Then I removed south from the installed_apps and tried syncdb, which worked perfectly. But import south works fine in shell. So I am sure that south is installed in my server. Why do I get this error?
edit: The same error occured in some other systems too. I install south using pip install south
In the comments you mention you are using Django 1.7.
I wouldn't imagine South to support that version, as South-like migration support (by the South author, no less) lands in 1.7: https://docs.djangoproject.com/en/dev/topics/migrations/
In eclipse,when i create new project, i got an error like,
Error creating Django project
settings.py file not created
Stdout:
Stderr:
If i synchronize present project and runserver, iam getting Error: No module named filterspecs.But i haven't used filterspecs in my project. Already filterspecs.py installed in usr/local/lib/python2.7/dist-packages/django/contrib/admin.
Kindly advise to rectify the error.
You may be using django.contrib.admin.filterspecs to create custom filters for your admin pages, such as outlined here:
Custom Filter in Django Admin on Django 1.3 or below
Unfortunatelly, you will have to rewrite these using the new list_filter module functionality.
See the manual here:
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter
This happened to me as well, even though my code wasn't directly using any filterspecs.
Run python manage.py runserver --traceback to see exactly where the error is coming from.
This module was removed in Django 1.4, but other external modules you have listed in your settings.py might still be using it, so make sure you upgrade everything in your INSTALLED_APPS list. In my case, I was using an outdated version of FeinCMS, but after I upgraded it, the error went away.
Obviously, your system is lacking filterspecs module which is required by the project. Install it by typing sudo pip install filterspecs in the console (if you are on linux)