Skip to content

Commit

Permalink
index tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobandreas committed Mar 24, 2012
1 parent 28f1d9b commit c4225e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion autocomplete/autocomplete.wsgi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def complete():
if len(completions) == 0:
return ''
suggestion = random.sample(completions, 1)[0]
completion = suggestion[len(context):]
completion = suggestion[len(request.args.get('context')):]
return completion

application = app
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@
if (ct === '') {
return;
}
alert('searching ' + ct);
$.get('http://autocomplete.jacobandreas.net/autocomplete',
{'sources': 'google', 'context': ct},
function(data) {
alert(data);
alert('got ' + data);
});
}
});
Expand Down

0 comments on commit c4225e0

Please sign in to comment.