Add PaymentProvider.public_name

This commit is contained in:
Raphael Michel
2017-06-29 11:44:27 +02:00
parent 9007501d81
commit d5d1fcf331
4 changed files with 13 additions and 3 deletions

View File

@@ -80,6 +80,16 @@ class BasePaymentProvider:
"""
raise NotImplementedError() # NOQA
@property
def public_name(self) -> str:
"""
A human-readable name for this payment provider to be shown to the public.
This should be short but self-explaining. Good examples include 'Bank transfer'
and 'Credit card', but 'Credit card via Stripe' might be to explicit. By default,
this is the same as ``verbose_name``
"""
return self.verbose_name
@property
def identifier(self) -> str:
"""

View File

@@ -20,7 +20,7 @@
data-parent="#payment_accordion"
{% if selected == p.provider.identifier %}checked="checked"{% endif %}
data-toggle="radiocollapse" data-target="#payment_{{ p.provider.identifier }}" />
<strong>{{ p.provider.verbose_name }}</strong>
<strong>{{ p.provider.public_name }}</strong>
</label>
</h4>
</div>

View File

@@ -27,7 +27,7 @@
data-parent="#payment_accordion"
{% if selected == p.provider.identifier %}checked="checked"{% endif %}
data-toggle="radiocollapse" data-target="#payment_{{ p.provider.identifier }}" />
<strong>{{ p.provider.verbose_name }}</strong>
<strong>{{ p.provider.public_name }}</strong>
</label>
</h4>
</div>

View File

@@ -24,7 +24,7 @@
</strong>
</div>
<h3 class="panel-title">
{{ payment_provider.verbose_name }}
{{ payment_provider.public_name }}
</h3>
</div>
<div class="panel-body">