lingo: change online payment page to directly display transactions (#25928)
This commit is contained in:
parent
3b7ac25aa5
commit
698253a149
|
@ -22,8 +22,7 @@ from django.core.urlresolvers import reverse_lazy
|
|||
from django.db.models import Q
|
||||
from django.utils import six
|
||||
from django.utils.timezone import make_aware
|
||||
from django.views.generic import (CreateView, UpdateView, ListView,
|
||||
DeleteView, TemplateView)
|
||||
from django.views.generic import CreateView, UpdateView, ListView, DeleteView
|
||||
from django.http import HttpResponse
|
||||
|
||||
import eopayment
|
||||
|
@ -99,7 +98,3 @@ def download_transactions_csv(request):
|
|||
else:
|
||||
writer.writerow([unicode(x).encode('utf-8') for x in row])
|
||||
return response
|
||||
|
||||
|
||||
class ManagerHomeView(TemplateView):
|
||||
template_name = 'lingo/manager_home.html'
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{% extends "lingo/manager_base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<ul class="apps">
|
||||
<li><a class="button" href="{% url 'lingo-manager-transactions-list' %}">{% trans 'Transactions' %}</a></li>
|
||||
<li><a class="button" href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a></li>
|
||||
</ul>
|
||||
{% endblock %}
|
|
@ -4,15 +4,11 @@
|
|||
{% block appbar %}
|
||||
<h2>{% trans 'Transactions' %}</h2>
|
||||
<span class="actions">
|
||||
<a href="{% url 'lingo-manager-regie-list' %}">{% trans 'Regies' %}</a>
|
||||
<a href="{% url 'lingo-manager-transactions-download' %}">{% trans 'download CSV' %}</a>
|
||||
</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumb %}
|
||||
{{ block.super }}
|
||||
<a href="{% url 'lingo-manager-transactions-list' %}">{% trans 'Transactions' %}</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form>
|
||||
|
|
|
@ -23,11 +23,10 @@ from .views import (RegiesApiView, AddBasketItemApiView, PayView, CallbackView,
|
|||
RemoveBasketItemApiView, ValidateTransactionApiView,
|
||||
CancelTransactionApiView, SelfInvoiceView)
|
||||
from .manager_views import (RegieListView, RegieCreateView, RegieUpdateView,
|
||||
RegieDeleteView, TransactionListView, ManagerHomeView, download_transactions_csv)
|
||||
RegieDeleteView, TransactionListView, download_transactions_csv)
|
||||
|
||||
lingo_manager_urls = [
|
||||
url('^$', ManagerHomeView.as_view(), name='lingo-manager-homepage'),
|
||||
url('^transactions/$', TransactionListView.as_view(), name='lingo-manager-transactions-list'),
|
||||
url('^$', TransactionListView.as_view(), name='lingo-manager-homepage'),
|
||||
url('^transactions/download-csv/$', download_transactions_csv, name='lingo-manager-transactions-download'),
|
||||
url('^regies/$', RegieListView.as_view(), name='lingo-manager-regie-list'),
|
||||
url('^regies/add/$', RegieCreateView.as_view(), name='lingo-manager-regie-add'),
|
||||
|
|
|
@ -139,7 +139,7 @@ def test_transactions_search(app, admin_user):
|
|||
amount=1+i).save()
|
||||
|
||||
app = login(app)
|
||||
resp = app.get('/manage/lingo/transactions/', status=200)
|
||||
resp = app.get('/manage/lingo/', status=200)
|
||||
assert resp.text.count('<tr') == 11
|
||||
|
||||
resp.form['q'] = 'order id 16'
|
||||
|
|
Loading…
Reference in New Issue