Error No Module Named Blog
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ImportError No module named blog up vote 3 down vote favorite 1 I'm working my way through a django tutorial http://net.tutsplus.com/tutorials/python-tutorials/python-from-scratch-creating-a-dynamic-website/ . Following the directions in the template section, I have added: TEMPLATE_DIRS = ( "F:/firstblog/blog/templates", Which is the full path. I'm getting the following error output: Request Method: GET Request URL: http://127.0.0.1:8000/ Django Version: 1.4.3 Exception Type: ImportError Exception Value: No module named blog Exception Location: f:\python27\lib\site-packages\django\utils\importlib.py in import_module, line 35 Python Executable: f:\python27\python.exe Python Version: 2.7.3 My installed apps are: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', I'd appreciate any advice on how to fix this, Thank you, Bill python django share|improve this question edited Feb 2 '13 at 13:09 asked Feb 2 '13 at 5:54 user61629 4,9321465137 3 i would suggest this original tutorial for django. clean and every aspect was mentioned. docs.djangoproject.com/en/1.4 or you can even go for dev. mind to show us your settings.py and views? –doniyor Feb 2 '13 at 6:04 Thanks, but what dev. mind ? - Bill –user61629 Feb 2 '13 at 13:15 dev = development version mind = do you mind there is point between them –doniyor Feb 2 '13 at 16:31 pls show us your views.py and the whole error trace –doniyor Feb 2 '13 at 16:32 1 Hi donyor, I think I've fixed this problem with the following comment from the tutorial: "I'm a noob so my terminology might not b
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up No module named blog up vote -4 down vote favorite I'm a newbie in django.Now I'm following a book named Python Web Development with Django and creating http://stackoverflow.com/questions/14659106/importerror-no-module-named-blog a light blog.With the app blog and sqlite3 chosen for testing, an error came up when running ./manage.py syncdb. The error is that Error: No module named blog This is part of my settings.py INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'mysite.blog', # Uncomment the next line to enable the admin: # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', http://stackoverflow.com/questions/15321385/no-module-named-blog 'mysql', 'sqlite3' or 'oracle'. 'NAME': '/var/db/django.db', # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } Here is all of the model.py in blog app: from django.db import models class BlogPost(models.Model): title = models.CharField(max_length = 150) body = models.TextField() timestamp = models.DataTimeField() I've searched through the similar questions in stackoverflow, but those resolutions doesn't work for me. python django share|improve this question edited Apr 15 '15 at 17:31 karthikr 52.2k1084105 asked Mar 10 '13 at 10:47 Edward 43 1 what was the error? –shx2 Mar 10 '13 at 10:50 I hope your code indentation is ok, cause here it looks like its not –apoq Mar 10 '13 at 10:52 @Kapo I just pasted it from my script.It's sure to be okay. –Edward Mar 10 '13 at 10:59 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted Try blog only: INSTALLED_APPS = ( ....... 'blog', ...... ) share|improve this answer answered Mar 10 '13 at 11:04 catherine 12.6k52955 Thanks, it works.But how do you know that removing the 'mysite.' helps? –Edward Mar 10 '13 at 15
here for a quick overview of the site Help Center http://stackoverflow.com/questions/16990436/django-importerror-at-blog-no-module-named-urls Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x error no Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Django - importError at /blog. (No module named urls) up vote 1 down vote favorite While studying Django error no module tutorial (the book is Python Web Development with Django), I've been getting an import error. I've looked for a solution on here and with Google, but I couldn't find one that worked. My error is ImportError at /blog. No module named urls. I'm using django 1.5.1. My files are structure - - mysite manage.py - blog __init__.py models.py tests.py urls.py views.py - templates archive.html - mysite __init__.py settings.py urls.py wsgi.py mysite/blog/urls.py from django.conf.urls.defaults import patterns, include, url from mysite.blog.views import archive urlpatterns = patterns('', url(r'^$', archive), ) mysite/blog/view.py from django.template import loader, Context from django.http import HttpResponse from mysite.blog.models import BlogPost def archive(requset): posts = BlogPost.objects.all() t = loader.get_template("archive.html") c = context({ 'posts': posts }) return HttpResponse(t.render(c)) mysite/mysite/urls.py from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^blog/', include('mysite.blog.urls')), # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), ) setting.py TEMPLATE_LOA