Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango: Error No module named apps.homepage
    primarykey
    data
    text
    <p>So I'm following a tutorial from programmersbook.com and I'm at a point where I've finished the 7th video located here <a href="http://www.youtube.com/watch?v=hTq98PGOqMA&amp;feature=share&amp;list=PL385A53B00B8B158E" rel="nofollow">http://www.youtube.com/watch?v=hTq98PGOqMA&amp;feature=share&amp;list=PL385A53B00B8B158E</a>.</p> <p>After passing the command to ./manage.py runserver I'm getting the following error.</p> <pre><code>ImportError at /admin/ No module named apps.homepage </code></pre> <p>Below are the contents of the files and a directory structure if needed.</p> <p>blog/blog/urls.py</p> <pre><code>from django.conf.urls import patterns, include, url from blog.apps.homepage import * # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^', include('blog.apps.homepage.urls')), # Examples: # url(r'^$', 'blog.views.home', name='home'), # url(r'^blog/', include('blog.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: # url(r'^admin/', include(admin.site.urls)), ) </code></pre> <p>blog/apps/homepage/urls.py</p> <pre><code> from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^$', 'blog.apps.homepage.views.index'), ) </code></pre> <p>blog/apps/homepage/views.py</p> <pre><code>from django.http import HttpResponse def index(request): return HttpResponse('Index Page') </code></pre> <p>Just in case it's needed here's my file and directory structure</p> <pre><code>blog ├── apps │   ├── homepage │   │   ├── __init__.py │   │   ├── models.py │   │   ├── tests.py │   │   ├── urls.py │   │   └── views.py │   └── __init__.py ├── blog │   ├── __init__.py │   ├── settings.py │   ├── urls.py │   └── wsgi.py ├── custom │   └── __init__.py ├── data.db ├── manage.py ├── static │   ├── css │   ├── img │   ├── js │   ├── restricted │   └── upload └── templates </code></pre> <p>Could someone help me understand what I can do to fix this error?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload