title: Why is the URL 404 not found with Django?
body: <p>I have written a Django script that runs a Python parser to web s*e. I am sending the request to the Django script via AJAX. However, when the Ajax runs, it comes back as 404 not found for the URL. Why is this happening?</p>
  
  <p>My code is below:</p>
  
  <p>Ajax (with jQuery):</p>
  
  <pre><code>//send a `post` request up to AWS, and then 
  //insert the data into the paths
  
  $.post('/ca', function(data){
  //evaluate the JSON
  data = eval ("(" + data + ")");
  //insert the vars into the DOM
  var contentOne;
  contentOne = data.bridge_time;
  contentOne += 'min delay';
  $('#timeone').html(contentOne);
  var contentTwo;
  contentTwo = data.tunnel_time;
  contentTwo += 'min delay';
  $('#timetwo').html(contentTwo);
  //if this falls through, push an error.
  var tunnel_time = data.tunnel_time;
  var bridge_time = data.bridge_time;
  var tunnel = document.getElementById('tunnel');
  var bridge = document.getElementById('bridge');
  var tunnelText = document.getElementById('timeone');
  var bridgeText = document.getElementById('timetwo');
  //algo for the changing icons. Kudos to Vito
  if(tunnel_time&lt;bridge_time){
    tunnel.src="tunnel3.png";
    bridge.src="bridge2r.png";
  }else if( bridge_time&lt;tunnel_time){
    bridge.src="bridge21.png";
    tunnel.src="tunnel2r.png";
  }else{
    bridge.src="bridge2n.png";
    tunnel.src="tunnel2g.png";
  }
    $.fail(function() {
  alert("We're sorry. We are having an error. Check back later.");
  });
  });
  </code></pre>
  
  <p>My urls.py:</p>
  
  <pre><code>from django.conf.urls.defaults import *
  from views import views
  
  urlpatterns = patterns('',
                     (r'^/us', views.american_time),
                     (r'^/ca', views.canadian_time),
  )
  </code></pre>
  
  <p>My <code>urls.py</code> and my <code>views.py</code> are in the same folder, if that makes any difference. They are just titled <strong>views.py</strong> and <strong>urls.py</strong>. Thank you! </p>