Skip to content

Commit

Permalink
Add support for EscapeString
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cramer authored and David Cramer committed Mar 8, 2010
1 parent 2dc9c42 commit 9b4c937
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions djangosphinx/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ def exclude(self, **kwargs):
filters.setdefault(k, []).extend(map(to_sphinx, v))
return self._clone(_excludes=filters)

def escape(self, value):
cl = self._get_sphinx_client()
return cl.EscapeString(value)

# you cannot order by @weight (it always orders in descending)
# keywords are @id, @weight, @rank, and @relevance
def order_by(self, *args, **kwargs):
Expand Down

0 comments on commit 9b4c937

Please sign in to comment.