title: how to get values from views.py and use it in html template?
body: <p>I'm making a Map where users can log in and assign default start and end points. I am very new to Django and html, now I am stuck on not knowing how to pass variable values into html. </p>
  
  <p>this is my views.py</p>
  
  <pre><code>def maps(request):
      username = password = ''
      if request.method == 'POST':
          username = request.POST.get('username')
          password = request.POST.get('password')
  
          user = authenticate(username = username, password = password)
  
          if user is not None:
              if user.is_active:
  
                  login(request, user)
  
                  traffic_start = Auth.objects.get(user = user).traffic_start
                  traffic_end = Auth.objects.get(user = user).traffic_end
  
      return render_to_response('maps.html')
  </code></pre>
  
  <p>and i'm trying to use the values in the html file here</p>
  
  <pre><code>function calcRoute(){
      var start = document.getElementById('start').value;
      var end = document.getElementById('end').value;
      var request = {
        origin: start,
        destination: end,
        travelMode: google.maps.TravelMode.DRIVING
      };
      directionsService.route(request, function(response, status){
        if(status == google.maps.DirectionsStatus.OK){
          directionsDisplay.setDirections(response);
        }
      });
    }
    google.maps.event.addDomListener(window, 'load', initialize);
  </code></pre>
  
  <p>I tried looking for similar threads but I am still unable to figure it out, please help me, much appreciated!!</p>