Files
pretix_original/src/setup.cfg
rash f04df7a6ee Migrate vue2 control components and widget to vue3 and vite (#5989)
* setup vite and integrate fully with django

- vite starts with `python manage.py runserver`
- add templatetags to simply load vite hmr and entry points
- add eslint (recheck rules)
- enable non-strict ts

* better syntax for cors header setting

* migrate checkin rules editor to vue3

- move constants to a module
- move reading from and writing to non-vue html to django interop module
- switch to composition api and script setup sfc with pug
- use optional chaining operators a lot to simplify code

* migrate webcheckin plugin to vite+vue3

- migrate vue sfcs to script setup and pug
- move fetch calls into a api.ts module
- move common formatting and i18n strings into module

* fix migration error

* first draft migrating widget to vue3/vite

* first couple widget e2e tests

courtesy of claude
most of the tests don't work yet

* test file is not actually used

* drop widget_ prefix from e2e test fixtures

* add test for complete widget journey for simple event

* switch timezone in e2e tests to Europe/Berlin

* make dates in e2e tests relative

* migrate widget bugfix #5886

* start testing event series widget

* working vite widget setup for prod (untested), local dev (with or without dev server) and pytests, with flags for running the old version or the vite version

* simplify e2e test iframe check

* less flaky e2e tests

* top level await in iife build mode is not supported, so let's do import.meta.glob instead (we just need the build step not to see await, the code doesn't actually ever get loaded because it's DEV only)

* fix inconsistencies from automatic migration

* Allow gradual rollout of new vite-based widget by adding urls to an allowlist that gets checked against the "Origin" http header of request fetching the widget js

* add e2e tests for widget button, testing empty cart, adding specific items, and subevents

* remove janky claude testts again

* resolve migration TODOs: properly refocus parent on navigations

* use `npm run dev:control` for the vite dev server for admin components

* upgrade npm dependencies

* fix js linter errors

* fix python linter errors

* build all control vue components

* add new js config files to check-manifest ignore

* working prod build

acutal serving of built assets not tested yet

* fix templatetag paths to match what's in the vite mantifest

* add missing quotes around 'unsafe-eval' cors value

* remove now unused old vue2 tooling

* try fixing e2e test ci

* fix flake8 error

* check if vite build artefacts are in the wheel

* add license headers

* remove dom manipilation code necessary for `div.pretix-widget-compat` to work. No longer needed for vue3

* remove superfluous `createElement` calls

They might have been there because of IE, which is no longer relevant

* make widget dev mode parametizable through query params and document the usage and those params

* fix rst syntax

* remove migration todos file

Co-authored-by: luelista <mira@teamwiki.de>

* rearrange dockerfile commands for smaller image, thanks @luelista

* Update .gitignore, adding .vite

Co-authored-by: luelista <mira@teamwiki.de>

* add eslint CI

* make vue dev work in plugins

* fix docker build

* rebuild vite setup to support static prod plugins and dynamic hmr plugin development

* use toml for vite plugin config instead of standalone json file

* Add widget changes from #6047, #6149

* Allow buttons to reuse cart (Z#23226853)

* Always keep cart of buttons with items set

* widget: handle cart if not same-site (#6149)

---------

Co-authored-by: luelista <mira@teamwiki.de>
Co-authored-by: Kara Engelhardt <engelhardt@pretix.eu>
2026-05-11 15:05:06 +02:00

117 lines
3.5 KiB
INI

[flake8]
ignore = N802,W503,E402,C901,E722,W504,E252,N812,N806,N818,E741
max-line-length = 160
exclude = data/*,migrations,.ropeproject,static,mt940.py,_static,build,make_testdata.py,*/testutils/settings.py,tests/settings.py,pretix/base/models/__init__.py,pretix/base/secretgenerators/pretix_sig1_pb2.py,.eggs/*
max-complexity = 11
[isort]
combine_as_imports = true
include_trailing_comma = true
known_first_party = pretix
known_third_party = versions,tests
extra_standard_library = typing,enum,mimetypes
multi_line_output = 5
line_length = 79
honor_noqa = true
skip_glob = data/**,make_testdata.py,wsgi.py,bootstrap,celery_app.py,pretix/settings.py,tests/settings.py,pretix/testutils/settings.py,.eggs/**
[tool:pytest]
DJANGO_SETTINGS_MODULE = tests.settings
addopts = -rw
asyncio_mode = auto
asyncio_default_fixture_loop_scope = function
# Playwright E2E test configuration
# Uncomment for debugging: --headed shows browser UI, --slowmo slows operations
# addopts = -rw --headed --slowmo 500
# Browser selection (chromium, firefox, webkit)
# --browser chromium
filterwarnings =
error
ignore:.*invalid escape sequence.*:
ignore:The 'warn' method is deprecated:DeprecationWarning
ignore::django.utils.deprecation.RemovedInDjango60Warning:
ignore:.*This signal will soon be only available for plugins that declare to be organizer-level.*:DeprecationWarning:
ignore::DeprecationWarning:mt940
ignore::DeprecationWarning:cbor2
ignore::DeprecationWarning:markdown
ignore::DeprecationWarning:celery
ignore::DeprecationWarning:kombu
ignore::DeprecationWarning:django
ignore::DeprecationWarning:cgi
ignore::DeprecationWarning:vat_moss
ignore::cryptography.utils.CryptographyDeprecationWarning:pypdf
ignore:.*ast.NameConstant.*:DeprecationWarning:reportlab
ignore:.*utcnow.*:DeprecationWarning:
ignore:.*PyType_Spec.*:DeprecationWarning:
ignore:.*truth value.*:DeprecationWarning:sepaxml
ignore::pytz_deprecation_shim._exceptions.PytzUsageWarning:vobject
ignore:the load_module.* method is deprecated:DeprecationWarning
ignore::ImportWarning
ignore::ResourceWarning
ignore:django.contrib.staticfiles.templatetags.static:DeprecationWarning
ignore::DeprecationWarning:compressor
ignore:.*FakeStrictRedis.hmset.*:DeprecationWarning:
ignore:pkg_resources is deprecated as an API:
ignore:.*declare_namespace.*:
ignore:.*PdfMerger.*:
ignore:teardown:pytest.PytestWarning
ignore:avoid running initialization queries:RuntimeWarning
ignore:.*The 'strip_cdata' option of HTMLParser.*:DeprecationWarning:
[coverage:run]
source = pretix
omit = */migrations/*,*/urls.py,*/tests/*,*/testdummy/*,*/admin.py,pretix/wsgi.py,pretix/settings.py,.eggs/*
[coverage:report]
exclude_lines =
pragma: no cover
def __str__
der __repr__
if settings.DEBUG
NOQA
NotImplementedError
[potypo]
default_language = en_US
locales_dir = pretix/locale
no_fail =
ar
cs
da
es
fr
it
nl
pt_BR
wl_dir = pretix/locale
edgecase_words =
add-ons
add-on's
same-origin"-requests
MT940
MT940-Format
pre-selected
support@pretix.eu
pretix.eu
pretix.eu-Blog
pretix.eu-Server
Prüf-Ergebnisse
Transaktions-ID
translate.pretix.eu
AGPLv3
4th
214th
INV-001
INV-00001
to-do
To-Do
Use-Case
Use-Cases
phrases =
ticketing powered by
powered by
Stripe Connect
chunkers = enchant.tokenize.HTMLChunker
filters = PythonFormatFilter,enchant.tokenize.URLFilter,HTMLFilter