title: Django Basics myapp mapping in myproject "myapp" is not defined
body: <p>I am learning django, and have ran <code>python manage.py startapp myapp</code> which created the following folder structure:</p>
  
  <pre><code>myapp/
     __init__.py
     admin.py
     models.py
     tests.py
     views.py
  </code></pre>
  
  <p>I also added <code>myapp</code> to <code>INSTALLED_APPS</code> in settings,</p>
  
  <pre><code>INSTALLED_APPS = (
     'django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'myapp',
  )
  </code></pre>
  
  <p>then I ran <code>python manage.py migrate</code> and <code>python manage.py createsuperuser</code> to create super user</p>
  
  <p>I have also created views of myapp :</p>
  
  <pre><code>"from django.http import HttpResponse
  
  def hello(request):
     text = """&lt;h1&gt;welcome to my app !&lt;/h1&gt;"""
     return HttpResponse(text)
  "
  </code></pre>
  
  <p>Finally, here's the URL mapping:</p>
  
  <pre><code>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'^hello/', 'myapp.views.hello', name = 'hello'),
  )
  </code></pre>
  
  <p>When ran, it throws an error stating that "myapp" is not defined. And I am not able to access admin page at <a href="http://127.0.0.1:8000/admin" rel="nofollow">http://127.0.0.1:8000/admin</a></p>
  
  <p>How can I solve this error and get my application to work?</p>