Skip to content

Commit 9f20d1c

Browse files
committed
update to 2.0; remove segno/qrcode
1 parent 8a20cfd commit 9f20d1c

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

README.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ In the plugin settings you can set a custom text which will not only be displaye
1515

1616
Please note, that you will have to mark the orders as payed by hand using the pretix backend. You may also - at your own risk - use the `pretix-cashpoint`_ in conjunction with the `de.pccoholic.pretix.cashpoint`_ android app to mark tickets as payed.
1717

18+
Compatibility
19+
-------------
20+
As major versions in pretix tend to also include major changes, compatibility can be difficult to maintain.
21+
22+
In order to make things simpler, the versioning of this plugin is also orienting itself on the versioning of pretix.
23+
24+
On other words: If you are running pretix 1.x, you should only install this plugin in a 1.x-version. The 2.x-version *might* work just fine, but is implementing pretix 2.x-functionality, which might not be available on legacy systems or might even break it.
25+
1826
Production setup - pip method
1927
-----------------------------
2028

@@ -57,7 +65,7 @@ Development setup
5765
License
5866
-------
5967

60-
Copyright 2017 Martin Gross
68+
Copyright 2018 Martin Gross
6169

6270
Released under the terms of the Apache License 2.0
6371

pretix_cashpayment/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class PretixPluginMeta:
1010
author = 'Martin Gross'
1111
description = _('This plugin allows you to offer your customers a "pay with cash at the venue" option.')
1212
visible = True
13-
version = '1.0.2'
13+
version = '2.0.0'
1414

1515
def ready(self):
1616
from . import signals # NOQA

pretix_cashpayment/payment.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from collections import OrderedDict
22

3-
import segno
43
from django.http import HttpRequest
54
from django.template.loader import get_template
65
from django.utils.translation import ugettext_lazy as _
@@ -54,16 +53,11 @@ def order_pending_mail_render(self, order) -> str:
5453
return template.render(ctx)
5554

5655
def payment_pending_render(self, request: HttpRequest, payment: OrderPayment):
57-
if 'pretix_cashpoint' in self.event.get_plugins():
58-
qrcode = segno.make_qr(payment.order.full_code, error='H').png_data_uri(scale=10, border=0)
59-
else:
60-
qrcode = None
6156
template = get_template('pretix_cashpayment/pending.html')
6257
ctx = {
6358
'event': self.event,
6459
'order': payment.order,
6560
'information_text': self.settings.get('information_text', as_type=LazyI18nString),
66-
'qrcode': qrcode,
6761
}
6862
return template.render(ctx)
6963

pretix_cashpayment/templates/pretix_cashpayment/pending.html

-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,4 @@
1010
<br />
1111
{% trans "Amount:" %} {{ order.total|localize }} {{ event.currency }}<br />
1212
<strong>{% trans "Reference code (important):" %} {{ order.full_code }}</strong><br />
13-
{% if qrcode %}
14-
<img class="img-responsive center-block" src="{{ qrcode }}" />
15-
{% endif %}
1613
</address>

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ def run(self):
2525

2626
setup(
2727
name='pretix-cashpayment',
28-
version='1.0.2',
28+
version='2.0.0',
2929
description='pretix plugin that allows you to offer your customers a "pay with cash at the venue" option.',
3030
long_description=long_description,
3131
url='http://www.github.com/pc-coholic/pretix-cashpayment',
3232
author='Martin Gross',
3333
author_email='[email protected]',
3434
license='Apache Software License',
3535

36-
install_requires=['segno'],
36+
install_requires=[],
3737
packages=find_packages(exclude=['tests', 'tests.*']),
3838
include_package_data=True,
3939
cmdclass=cmdclass,

0 commit comments

Comments
 (0)