No module named 'blog'

1,554 views
Skip to first unread message

Maggie Chang

unread,
Aug 9, 2015, 1:08:13 PM8/9/15
to Django users
hi all,
would like to seek for everyone's help.
I am following the django girls instruction => http://tutorial.djangogirls.org/en/django_urls/index.html#your-first-django-url, but encounter the problem. 
when I connect to 127.0.0.1:8000, I got the No module named 'blog' response.
Here's the message on browser.
**************

ImportError at /

No module named 'blog'
Request Method:GET
Request URL:http://127.0.0.1:8000/
Django Version:1.8
Exception Type:ImportError
Exception Value:
No module named 'blog'
Exception Location:/usr/lib/python3.4/importlib/__init__.py in import_module, line 109
Python Executable:/home/maggie/djangoanywhere/venv/bin/python
Python Version:3.4.0
Python Path:
['/home/maggie/djangoanywhere',
 '/usr/lib/python3.4',
 '/usr/lib/python3.4/plat-x86_64-linux-gnu',
 '/usr/lib/python3.4/lib-dynload',
 '/home/maggie/djangoanywhere/venv/lib/python3.4/site-packages']
Server time:Mon, 10 Aug 2015 00:47:53 +0800
**************

This issue occurred when I add url(r'', include('blog.urls')), into magsite/url.py
**************
url.py
**************
from django.conf.urls import include, url
from django.contrib import admin


urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'', include('blog.urls')),
]
**************
Any idea about the root cause? :(
and any response will be appreciate.

Robin Lery

unread,
Aug 9, 2015, 1:13:38 PM8/9/15
to django...@googlegroups.com
Did you add your 'blog' app in the installed apps in settings.py?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0c3ba90d-97d3-448c-8656-0b2ad6becca7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mukesh Badgujar

unread,
May 7, 2020, 6:40:07 AM5/7/20
to Django users
already added

    'home.apps.HomeConfig',
    'blog.apps.BlogConfig',
    'shop.apps.shopConfig',

one thing is that, i copied this app folder frm my other project, this is not created here


On Sunday, 9 August 2015 22:43:38 UTC+5:30, Robin Lery wrote:
Did you add your 'blog' app in the installed apps in settings.py?
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

Mohsen Pahlevanzadeh

unread,
May 7, 2020, 8:39:24 AM5/7/20
to django...@googlegroups.com
Where did you import your module?

To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4a25e83a-0f62-4f60-8401-618252682a22%40googlegroups.com.

Mukesh Badgujar

unread,
May 8, 2020, 6:53:26 AM5/8/20
to django...@googlegroups.com
First... I... created.... Project at my machine... then... uploaded to github.... then.... from  git i import it to my namecheap shared hosting server, i created python app in that folder, then i run migrations cmds... but apps are not detected by django

sri vishva

unread,
May 9, 2020, 9:57:01 AM5/9/20
to django...@googlegroups.com
Try creating a new app Blog using 
>>pip install django-admin startapp Blog
And now replace the existing files with your contents 

sahil khan

unread,
May 9, 2020, 11:46:29 PM5/9/20
to django...@googlegroups.com
I think blog app is not there where manage.py file. please check and if your blog app's location is wrong delete blog app and create again app inside your project with correct  location.

New app command: 

Django-admin startapp <app name >

Mukesh Badgujar

unread,
May 10, 2020, 6:19:34 AM5/10/20
to django...@googlegroups.com
thanks problem solved....🙏🙏🙏🙏

Reply all
Reply to author
Forward
0 new messages