82
Switch
from News.models import News_Article
to
from Bolton_GC.News.models import News_Article
41
Just to elaborate on @TheLifeOfSteve’s answer, all the import statements are always relative to your manage.py file.
If the manage.py file was at the path Bolton_GC/Bolton_GC, then the correct import statement would just be:
from News.models import News_Article
But in the current directory structure, the following is the correct answer as pointed out by Steve.
from Bolton_GC.News.models import News_Article
- [Django]-How should I write tests for Forms in Django?
- [Django]-Import error django corsheaders
- [Django]-Default filter in Django admin
2
There is an update in Importing and registering Models!!
Please try from .models import News_Article
- [Django]-Django equivalent of SQL not in
- [Django]-How can one use enums as a choice field in a Django model?
- [Django]-Should I be adding the Django migration files in the .gitignore file?
Source:stackexchange.com