transports: make SMSTransport name customizable

This commit is contained in:
Benjamin Dauvergne 2013-06-24 11:00:23 +02:00
parent 8afa3e4e1a
commit f75d1e9fd8
1 changed files with 3 additions and 2 deletions

View File

@ -90,15 +90,16 @@ class SMSTransport(object):
]
mobile_re = re.compile('^0[67][0-9]{8}$')
def __init__(self, url, from_mobile, login=None, password=None, identifier='sms'):
def __init__(self, url, from_mobile, login=None, password=None, identifier='sms', name=_('sms')):
self.url = url
self.from_mobile = from_mobile
self.login = login
self.password = password
self.identifier = identifier
self.name = name
def get_choices(self):
return ((self.identifier, self.identifier),)
return ((self.identifier, self.name),)
def get_subscriptions(self, category):
return models.Subscription.objects.filter(category=category,