No Module Named 'Polls.Apps.Pollsconfigdjango'; Django Project Tutorial 2

ModuleNotFoundError: No module named 'learning_logsdjango'

  • add comma , after 'learning_logs' app name
--snip--
INSTALLED_APPS = [
# My apps
'learning_logs',
# Default django apps.
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]

How do I solve: ModuleNotFoundError: No module named error when starting Django shell error

You have an error in your Python code. Django cannot be started because the configuration is invalid. One of your INSTALLED_APPS is broken. A hint what could be wrong is given in the traceback.

For the actual error is, you need to figure it out yourself, as it would probably involve copy-pasting a lot of code from your project here and would not be a good fit for StackOverflow Q&A format.

Django tutorial 5 testing response = client.get(reverse('polls:index'))

The problem is in your index.html. In the following line :

{% for question in latest_question_list %}

you opened a for tag and forgot to close it by endfor.

why is __init__ module in django project loaded twice In the same process?

Because it's being loaded via two different entries in sys.path. Be consistent about your imports; I recommend importing the module without going through the project, e.g. import <app>.<module>. Configuring a WSGI container so that you're not dependent on manage.py's mangling of sys.path will help.



Related Topics



Leave a reply



Submit