transports: make SMSTransport name customizable
This commit is contained in:
parent
8afa3e4e1a
commit
f75d1e9fd8
|
@ -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,
|
||||
|
|
Reference in New Issue