I'm a complete beginner here. I created a Django 1.9 / Python 3.5 site with folder/files:
\myapp\
__init__.py
settings.py
urls.py
wsgi.py
\myapp\
__init__.py
models.py
test.py
urls.py
views.py
\myapp\myapp\urls.py:
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
]
\myapp\myapp\views.py:
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world.")
\myapp\urls.py:
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^myapp', include('myapp.urls')),
url(r'^admin/', admin.site.urls),
]
When I try to load the site in the browser (just the root URL), I get:
import error at /
No module named 'myapp'
Any idea why this is happening?