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
Chain-Calling Parent Initialisers in Python
Python Read from Subprocess Stdout and Stderr Separately While Preserving Order
Django Return Redirect() with Parameters
Product Code Looks Like Abcd2343, How to Split by Letters and Numbers
How to Run Pygame or Pyglet in a Browser
Hiding a Password in a Python Script (Insecure Obfuscation Only)
How to Extract Data from Matplotlib Plot
Python Dictionary:Typeerror: Unhashable Type: 'List'
Installing Numpy on 64Bit Windows 7 with Python 2.7.3
How to Make Python Scripts Executable on Windows
Include Intermediary (Through Model) in Responses in Django Rest Framework
Principal Component Analysis (Pca) in Python
Inheritance of Private and Protected Methods in Python
Typeerror: 'Dict' Object Is Not Callable
In Selenium Web Driver How to Choose the Correct Iframe
How to Convert a Numpy Array to Pil Image Applying Matplotlib Colormap
Getting the Caller Function Name Inside Another Function in Python