Commit Graph

67 Commits

Author SHA1 Message Date
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
luelista
38be6d13da Update setup.rst (#5283) 2025-07-17 11:21:09 +02:00
Raphael Michel
2f2551cc71 Prepare for new docs, remove user docs as they move to own repo (#4819) 2025-02-14 14:05:19 +01:00
George Hickman
cdde688964 Remove git dir and work tree config from pre-commit hook (#4397)
These variables effectively hardcode the location from which the script
is run.  We shouldn't need these since git should know that it is inside
a repo when run.
2024-08-15 12:42:57 +02:00
Raphael Michel
f0a06cd9fe Replace SCSS compilation with CSS variables (#4191)
* Replace SCSS compilation with CSS variables

* Update tests

* Update src/pretix/presale/style.py

Co-authored-by: Mira <weller@rami.io>

* Update src/pretix/presale/context.py

Co-authored-by: Mira <weller@rami.io>

* Update src/pretix/presale/views/widget.py

Co-authored-by: Mira <weller@rami.io>

* Update src/pretix/presale/context.py

Co-authored-by: Mira <weller@rami.io>

* Update src/pretix/static/pretixbase/scss/_variables.scss

Co-authored-by: Richard Schreiber <schreiber@rami.io>

* Last minor changes

* Rename file

---------

Co-authored-by: Mira <weller@rami.io>
Co-authored-by: Richard Schreiber <schreiber@rami.io>
2024-06-25 13:01:20 +02:00
Mira
b638c00952 Time machine mode [Z#23129725] (#3961)
Allows organizers to test their shop as if it were a different date and time.

Implemented using a time_machine_now() function which is used instead of regular now(), which can overlay the real date time with a value from a ContextVar, assigned from a session value in EventMiddleware.

For more information, see doc/development/implementation/timemachine.rst

---------

Co-authored-by: Richard Schreiber <schreiber@rami.io>
Co-authored-by: Raphael Michel <michel@rami.io>
2024-05-17 10:52:17 +02:00
Kian Cross
d6caf01a38 Add warning about configuration of Celery in development mode to docs (#3525) 2023-08-22 10:44:11 +02:00
Raphael Michel
386e658d0b Update developer guide 2023-04-25 10:04:05 +02:00
Michael Stapelberg
ba1a5f0e35 Docs: Note on periodic tasks in dev setup (#3228)
It took a little bit of searching to figure out that in the dev environment, by
default, celery tasks are run synchronously, but periodic tasks are not run at
all.
2023-04-16 14:24:35 +02:00
Bentrex95
954d86337c Docs: Fix typo in dev-setup-command (#2316) 2021-11-12 12:42:07 +01:00
Bentrex95
e433230573 Docs: Update dependencies for dev setup (#2282)
Co-authored-by: Raphael Michel <michel@rami.io>
2021-11-03 12:35:26 +01:00
Raphael Michel
d187a497f9 Restructure dependencies (#2121) 2021-06-11 12:51:20 +02:00
Raphael Michel
92a50cb2d1 Web-based check-in interface (#1985) 2021-03-30 09:34:11 +02:00
Raphael Michel
22bba28bea Add pluggable ticket secret generators (#1809) 2020-10-19 15:00:55 +02:00
Felix Rindt
77f76195c8 isort 5.0 config/docs (#1736) 2020-07-30 17:57:26 +02:00
pajowu
02d0a68d57 Remove obsolete reference to test data 2019-09-05 19:29:04 +02:00
Raphael Michel
e55f0cdf11 Retire make_testdata.py 2019-07-14 17:55:51 +02:00
ligi
97fc226e07 Document development dependency libenchant1c2a (#1294) 2019-05-19 13:06:24 +02:00
Raphael Michel
aa186f7a09 Update setup.rst 2019-05-19 13:02:05 +02:00
ligi
1b434b40d2 Add external dependency python-venv
otherwise in the next step I get
```
$ python3 -m venv env
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt-get install python3-venv
```
2019-05-17 19:32:32 +02:00
Raphael Michel
afd766999c Upgrade to Django 2.1 (#710)
* Upgrade to Django 2.0

* more models

* i18n foo

* Update setup.py

* Fix Sentry exception PRETIXEU-JC

* Enforce slug uniqueness

* Import sorting

* Upgrade to Django 2.1

* Travis config

* Try to fix PostgreSQL failure

* Smaller test matrix

* staticfiles→static

* Include request in all authenticate() calls
2018-08-06 12:48:46 +02:00
Raphael Michel
9cff77be62 Add blacklist to git hook recommendatio 2018-06-24 16:14:58 +02:00
Raphael Michel
204d8cc7eb Fix git hook 2018-05-02 10:34:50 +02:00
Raphael Michel
61f5d4b172 Docs: Change git hook to only look in changed files 2018-05-02 09:56:33 +02:00
Raphael Michel
d879634810 Add documentation on the translation process 2018-03-08 12:18:33 +01:00
Dominik Weitz
f054e700a2 Update development documentation, change demo URL (#736)
When using the test data generation script, the demo conference no longer has the URL ``/bigevents/2018``, but is now moved to ``/bigevents/2019`` . This confused me in the beginning.
2018-01-04 15:32:14 +01:00
Jakob Schnell
9ab39904e8 Implement automatic spell-check for docs (#688)
* [WIP] Implement automatic spell-check for docs

fixes #663

The only thing unclear to me so far is how the output of `make spelling`
should be checked - is there a possibility to check for a file (i.e.
`_build/spelling/output.txt`) to be empty, and report a failed build
otherwise?

* fix typo in requirements.txt

* add enchant library

* travis should report errors, order spelling wordlist

* change travis.yml to easier troubleshoot build issues

* fixed more typos, added more words

* add more words, fix more typos

* added more words

* added more words

* revert changes to .travis.yml
2017-12-11 11:41:59 +01:00
Haroon Sheikh
11d76656de Fix #538 -- Remove pyvenv from docs (#633) 2017-10-07 16:50:14 +02:00
Raphael Michel
4b12678fa4 Various docs improvements 2017-06-19 12:01:00 +02:00
Raphael Michel
983326e610 Stop pinning chardet/setuptools versions 2017-05-27 12:50:18 +02:00
lhhong
ed7e90451b Minor update to setup documentation 2017-05-21 10:29:56 +02:00
Raphael Michel
960d0bcdf2 Link to Django's runserver options in dev docs 2017-05-02 00:15:39 +02:00
alainrk
550ab7de18 Added python3-dev package to External Dependencies (#451) 2017-04-01 15:40:46 +02:00
chotee
cfda772133 Improved documentation by adding some requirements that where needed to install from a clean Debian 8.6 installation. (#365)
Before the ```$ pip3 install -r requirements.txt -r requirements/dev.txt``` installation step would succeed I needed to add the following dependencies:
```$ sudo aptitude install libxml2-dev```
```$ sudo aptitude install libxslt1-dev```
The Error without the dependencies ended with:
```
    In file included from src/lxml/lxml.etree.c:515:0:
    src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
     #include "libxml/xmlversion.h"
                                   ^
    compilation terminated.
    Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    creating tmp
    cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitm_7rr3ky.c -o tmp/xmlXPathInitm_7rr3ky.o
    /tmp/xmlXPathInitm_7rr3ky.c:1:26: fatal error: libxml/xpath.h: No such file or directory
     #include "libxml/xpath.h"
                              ^
    compilation terminated.
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************
    error: command 'x86_64-linux-gnu-gcc' failed with exit status
```

In the "make localcompile" step I had to do
```$ sudo aptitude install gettext```
before it would succeed.

There was a reference to a demo event ("/mrmcd/2015/") it should probably be /bigevents/2017/ .
2016-12-19 09:01:59 +01:00
Tobias Kunze
58668010a2 Remove trailing whitespaces (#361) 2016-12-16 21:44:34 +01:00
Tobias Kunze
f13965da92 Consistently refer to 'pip3'. Closes #318. 2016-11-26 13:10:30 +01:00
Raphael Michel
d701133f15 Revert to setuptools 28.6 on CI due to
https://github.com/pypa/setuptools/issues/833
2016-10-29 12:50:26 +02:00
Raphael Michel
1008f4c668 Improve development setup documentation 2016-10-13 22:57:56 +02:00
Raphael Michel
b6a34975a9 py.test: rerun and print warnings by default 2016-09-27 11:06:58 +02:00
Raphael Michel
68e51c0f74 Added pytest-rerunfailures 2016-09-16 00:03:42 +02:00
Raphael Michel
8c7e051f8d Updated dev docs as we removed all submodules 2016-09-01 11:30:44 +02:00
FlaviaBastos
65c16bdc58 Fix #160 -- Add step to run collectstatic and info for testing env (#194)
* Add step to run collectstatic and infor for testing env
#160

* remove info for testing
2016-08-29 22:26:26 +02:00
Raphael Michel
7b5dd6bd6c Speed up the test suite 2016-08-14 17:56:58 +02:00
Tobias Kunze
509b2e4f3e Document mail testing setup for devs (#157) 2016-08-10 22:17:16 +02:00
Tobias Kunze
310a14a393 Move middleware functionality to utils.py (#154)
This simplifies providing an `event_view` method which works as
decorator for presale/ views (e.g. for plugins), providing passing
requests with event and organizer context if possible, and re-routing or
failing appropriately otherwise.
2016-07-26 10:27:59 +02:00
Tobias Kunze
bfc721978d Fixed minor documentation errors and mistakes (#151) 2016-07-14 20:01:38 +02:00
Raphael Michel
e09f213f0c Fixed developer documentation for Python 3.4 2016-06-27 18:55:23 +02:00
Raphael Michel
fe7a91970c More docs on contributing 2016-05-08 12:47:19 +02:00
Raphael Michel
e2febb2979 Removed less from documentation 2016-05-08 12:37:02 +02:00
Raphael Michel
f348000dff Fixed a documentation typo 2015-10-18 23:14:36 +02:00