I am new to python and javaScript, I have created a funtion that
return the tags via ajax.  I tried to replicate the php example.  But
it's not working.  I doesn't return any tags back to my html page via
ajax.  I need some help.  I am using jQuery autocomplete plugin from
here: 
http://just-tech.blogspot.com/2006/12/jquery-tweaking-auto-complete-plugin.html.
Here is my function in view:

def tag_autocomplete(request):
#    $q = $_GET['q'];
#    foreach($countries as $country) {
#    if(eregi("^".$q, $country)) {
#        echo $country."\r\n";
#    }

    s = request.GET.get('q', '')
    current_tags = list(Tag.objects.all())
    for tag in current_tags:
        if (search (s.lower(), tag.normalized_tag)):
            print "%s" % (tag.normalized_tag)



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to