Regexp must begin with ^
This commit is contained in:
parent
185f6ce4e3
commit
aa731d1ae4
3 changed files with 5 additions and 5 deletions
|
|
@ -300,7 +300,7 @@ class UserAutocomplete(autocomplete.Select2QuerySetView):
|
|||
qs = User.objects.all()
|
||||
|
||||
if self.q:
|
||||
qs = qs.filter(username__regex=self.q)
|
||||
qs = qs.filter(username__regex="^" + self.q)
|
||||
|
||||
return qs
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue