title: Django - setting up urls.py and views.py
body: <p>I'm new to Django and am trying to configure my urls.py and views.py docs. This is probably a very simple issue but I can't for the life of me set up my urls.py and views.py docs so that localhost/index points to an index.html file I have created. I have followed the Django Project tutorial to the letter and tried many, many variations but this just isn't clicking for me. Any help would be much appreciated!</p>
  
  <p>The index.html file is located at mysite/templates/index.html</p>
  
  <p>My folder structure is like this...</p>
  
  <pre><code> mysite/
        mysite/
             __init__.py
             settings.py
             urls.py
             wsgi.py
        app/
             __init__.py
             admin.py
             models.py
             tests.py
             urls.py
             views.py
        templates/
             css
             img
             js
             index.html
  </code></pre>
  
  <p>My views.py contains:</p>
  
  <pre><code> from django.http import HttpResponse
   from django.shortcuts import render_to_response
   from django.template import Context, loader
   from django.http import Http404
  
   def index(request):
       return render(request, "templates/index.html")
  </code></pre>
  
  <p>UPDATE: My folder structure now looks like this:</p>
  
  <pre><code> mysite/
        mysite/
             __init__.py
             settings.py
             urls.py
             wsgi.py
             templates/
                       index.html
        app/
             __init__.py
             admin.py
             models.py
             tests.py
             urls.py
             views.py
        static/
             css
             img     
             js
  </code></pre>