Saturday, April 28, 2012

URL resolution in a Django template

I am using ajax to update a list of participants in my html page,
based on the student id selected.
I am trying to figure out how Django knows what path to look to find
my method.
Does it just go through all of the urls.py files until it finds a
method that matches the url request?

$('#id_student').change(function(){
var student_id = $(this).val();
$.get('{% url get_required_meeting_participants %}',
{id:student_id}, function(data) {
$(".participants").last().append(data);
});
});

In other words, if I have two methods with the same name, but each in
a different directory, how would Django know which method to call?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment