* Use fragment_product_list in voucher redemption view (Z#23246929)
* Formatting
* Fix usage in templates
* Review comments
* handle form prefix in fragment_product_list.html
---------
Co-authored-by: Raphael Michel <michel@pretix.eu>
* Add API-endpoint for event-meta-properties
* Add new doc-file to index, fix spelling and description
* Fix logentry
* Fix logentry again
* validate and add tests
* add meta_properties from organizer only
* fix choices validation
* filter unknown keys from choices due to django-formsets
* Apply batched suggestions from code review
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
* add safe-guard normalization to None to to_representation
* Apply batched suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* update tests to check for error-messages as well
* fix flake8
* fix permission tests
* Make ObjectListField more flexibel for re-use
* fix validation result
* Improve validation
* Change to I18nField for validation
* update MetaPropertyDictField
* fix docs for i18n strings
* make label_child configurable if MetaPropertyDictField should contain non-localized stuff
* undo test changes in events test
* fix flake8
* Apply batched suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* improve code formatting
---------
Co-authored-by: Richard Schreiber <schreiber@rami.io>
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* Event header: Fix wrapping of date in h2 header (Z#23245589)
This was already correct if the header was a h1
* Revert "Event header: Fix wrapping of date in h2 header (Z#23245589)"
This reverts commit 3d25316fe3.
* Event header: Remove date directly above other date
This removes the date from the <h2> option used when a header image is
uploaded and the header should still be shown. Rendering the date here
makes little sense, since the infobox with the date is always just a few
lines below. It still makes sense for the <h1> option where it becomes
part of the site header.
* Delete PayPal integration v1
Leaving only migrations behind
* Try to fix CI
* Fix tests some more
* Rename more plugin name instances in tests and docs
---------
Co-authored-by: Martin Gross <martin@pc-coholic.de>
* Money representation in templates: Allow more precision
When rendering money in templates, we used to have the following logic:
- When the decimal places fit the currency, render with Babel
- When they don't, e.g. we stored 123.67 JPY, even though there are no
fractional Yens, render without Babel with a custom format, but render
the fractional Yens because we'd rather *show* wrong data and make the
bug obvious than hide it.
However, we only did that up to a prevision of two places, we never
showed more. This is still sufficient for core pretix, but we have
plugins that need to operate in fractional cents. Also, we CAN render
everything through babel for consistent formatting.
There is one **risk**: This might cause weird results on SQLite. Since
SQLite has no concept of precise decimal math, results of in-SQL
computations can sometimes experience floating point errors and show
with A LOT of decimal palces. This used to be invisible since the UI
performed the rounding. With this PR – not any more. We'll need to see
how annoying it is, but it should only affect development mode.
This PR also fixes a bug in tax_rate_format that for some reason did not
do what it was supposed to do, even though I tested it back then, weird.
Might even be a Python version thing?
* Update src/pretix/base/templatetags/money.py
Co-authored-by: pajowu <engelhardt@pretix.eu>
* Apply suggestion from @pajowu
Co-authored-by: pajowu <engelhardt@pretix.eu>
* Fix typing stuff
* Fix precision issue
---------
Co-authored-by: pajowu <engelhardt@pretix.eu>
transfer_rotation_to_content (or rather add_transformation/replace_content) do not properly duplicate the contentstream they're modifying. this means that if you pass a pdf-level copy of the same bg_page multiple times, the content will be rotated multiple times but the rotation-property ('/Rotate') will only be changed for the first page
pypdfs docs explicitly say that you should not to add_transformation + merge, but instead use merge_transformed_page, which this now does for everything