Commit 749161e7 authored by bryhoyt's avatar bryhoyt

Add query_label to give each filter a unique label

parent deb60c15
......@@ -72,6 +72,14 @@ class BaseFilter(object):
"""
raise NotImplemented()
def query_label(self):
"""
Return a string that can be used in a url to identify this filter.
For example u'username_equals'
"""
return '{name}_{operation}'.format(name=self.name, operation=self.operation()).lower().replace(' ', '_')
def __unicode__(self):
return self.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment