title: django tutorial: custom 404 and 500 views
body: <p>Windows 7<br>
  Python 2.7.3<br>
  Django 1.5<br>
  python manage.py runserver</p>
  
  <p>I am following the tutorial as available at '<a href="https://docs.djangoproject.com/en/1.5/intro/tutorial03/">https://docs.djangoproject.com/en/1.5/intro/tutorial03/</a>'</p>
  
  <p>I got as far as the 'Write a 404 (page not found) view' before things got wierd.</p>
  
  <p>I have tried to work out how to make a custom 404 view. However, I am not sure:</p>
  
  <p>A. Where exactly the custom 404.html file should reside. Should it be in my project directory tree or in my Django directory tree. My project directory tree looks like this,  </p>
  
  <pre><code>1&gt; mysite  
  2&gt;     - mysite  
  3&gt;     - polls  
  4&gt;         - templates  
  5&gt;             - polls  
  6&gt;     - templates  
  7&gt;         - admin  
  </code></pre>
  
  <p>Currently the 404.html is @ 6>  </p>
  
  <p>B. What modifications have to be made where? I understand that a handler404 and a handler500 need to be set in the 'root' url conf. I have a url.py residing @ 2> and 3> (see tree above). Assuming that 2> is the correct place I assume that the syntax is as follows,  </p>
  
  <pre><code>handler404 = 'templates.404'
  handler500 = 'templates.500'
  </code></pre>
  
  <p>What else needs to be set, where?  </p>