lingo: remove callback_url on backend page (#56650)
This commit is contained in:
parent
a191ea942b
commit
aa85ec295a
|
@ -79,11 +79,6 @@ class PaymentBackendUpdateView(UpdateView):
|
|||
form_class = PaymentBackendForm
|
||||
success_url = reverse_lazy('lingo-manager-paymentbackend-list')
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
ctx['callback_url'] = self.request.build_absolute_uri(self.object.callback_url)
|
||||
return ctx
|
||||
|
||||
|
||||
class PaymentBackendDeleteView(DeleteView):
|
||||
model = PaymentBackend
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
|
||||
{% block content %}
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
{% if object.id and callback_url %}
|
||||
<p><label>{% trans "Callback URL:" %}</label> {{ callback_url }}</p>
|
||||
{% endif %}
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<div class="buttons">
|
||||
|
|
|
@ -662,13 +662,6 @@ def test_edit_payment_backend(app, admin_user):
|
|||
resp = app.get('/manage/lingo/paymentbackends/%s/edit' % payment_backend.pk, status=200)
|
||||
assert '/manage/lingo/paymentbackends/' in resp.text
|
||||
|
||||
# callback URL is shown
|
||||
assert (
|
||||
'<p><label>Callback URL:</label> http://testserver/lingo/callback-payment-backend/%s/</p>'
|
||||
% payment_backend.slug
|
||||
in resp
|
||||
)
|
||||
|
||||
# service cannot be changed
|
||||
assert 'disabled' in resp.form['service'].attrs
|
||||
|
||||
|
|
Loading…
Reference in New Issue