Commit Graph
67 Commits
Author SHA1 Message Date
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
Raphael MichelandGitHub 6af2d38a98 Add __Host- prefix to CSRF and session cookie, remove cookie_domain (#3831)
* Add __Host- prefix to CSRF and session cookie, remove cookie_domain

* Fix tests
2024-01-25 09:45:56 +01:00
Raphael Michel 3ba36512d2 Add event_pattern like event_url 2023-09-22 12:24:01 +02:00
Raphael MichelandGitHub e208a79c32 Docs: Update implementation docs for URL routing (#3510) 2023-08-07 14:13:19 +02:00
Raphael Michel 39d85fc112 Event creation: Fix rare crash (PRETIXEU-8RD) 2023-08-07 09:47:14 +02:00
Raphael MichelandGitHub bd32b33ba9 Bump Django to 4.1.* (#2989) 2023-06-05 09:56:31 +02:00
Raphael Michel 6ae5eecf27 Run event_view on org-level plugin views 2023-05-11 14:29:52 +02:00
Raphael Michel 60554dad9a Remove usage of deprecated Django APIs 2022-12-17 16:26:24 +01:00
c4b7aeaaa2 Consistently set default background PDFs on server, not client (#2840)
Co-authored-by: Martin Gross <gross@rami.io>
2022-10-06 14:14:56 +02:00
Raphael Michel bdb0a176da Bring back status code 400 for unknown domains 2022-08-08 10:20:32 +02:00
Raphael Michel 345a05e4ae Improve error message on mismatching host header on new installations 2022-08-08 10:19:32 +02:00
Raphael MichelandGitHub 403b8191e4 Upgrade to Django 3.2 (#2056) 2021-05-07 12:00:30 +02:00
Raphael MichelandGitHub a93287207b pretix Community Edition moves to AGPLv3-based license (#2023) 2021-04-12 10:33:47 +02:00
Aksh GuptaandGitHub 88ba7ab53a Refactor code quality issues (#2001) 2021-03-16 19:13:02 +01:00
Felix RindtandGitHub 77f76195c8 isort 5.0 config/docs (#1736) 2020-07-30 17:57:26 +02:00
Raphael Michel 939a38d53b Fix subsequent issue on event level domains 2020-06-04 20:32:21 +02:00
Raphael Michel a57280004e Fix another multidomain issue 2020-06-04 20:15:26 +02:00
Raphael Michel ce896cec8f Fix bug in previosu commit 2020-06-04 19:05:07 +02:00
Raphael Michel cd5f6b66a1 Do not cache event/organizer instance in multi domain middleware (might be harmful) 2020-06-04 18:33:15 +02:00
Raphael MichelandGitHub af23d6e4bf Upgrade to Django 3.0 and other dependencies (#1568)
* Upgrade Django to 3.0 and other dependencies to recent versions

* Fix otp version contsraint

* Remove six dependency

* Resolve some warnings

* Fix failing tests

* Update django-countries

* Resolve all RemovedInDjango31Warnings in test suite

* Run isort

* Fix import

* Update PostgreSQL version on travis
2020-03-23 15:02:20 +01:00
Raphael MichelandGitHub 7e9c9beace Allow to use a custom domain per event (#1617)
* Drop support for maindomain_urls/subdomain_urls in plugins

* Allow to use a custom domain per event

* Fix bug when manually saving domains

* Fix custom domains in debugging

* Fix middleware

* Fix middleware again, update docs
2020-03-23 13:03:14 +01:00
Raphael MichelandGitHub d46278f04f Set cookies with SameSite=None if possible (#1509) 2019-12-03 14:50:18 +01:00
Raphael MichelandGitHub 6d1dea7922 Upgrade to Django 2.2 and modern DRF and py.test (#1246)
* Upgrade django and stuff

* Update to Django 2.2 and recent versions of similar packages

* Provide explicit orderings to all models used in paginated queries

* Resolve naive datetime warnings in test suite

* Deal with deprecation warnings

* Fix sqlparse version
2019-04-07 14:09:49 +01:00
Tobias KunzeandRaphael Michel 51c6d60760 Use http_date instead of cookie_date (#1042)
http_date is deprecated as of Django 2.1
2018-10-09 10:50:25 +02:00
Raphael Michel db513b21f8 Fix Apple Pay verification for organizer domains 2018-10-09 09:22:12 +02:00
Raphael Michel fc71f484ad Fix urlconf definition 2018-10-05 10:41:35 +02:00
Raphael Michel a85b96ea89 Allow plugins to have organizer_patterns 2018-10-05 09:31:14 +02:00
Raphael MichelandGitHub 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 b8225bd206 Stop creating an empty session on first request 2018-03-10 14:19:28 +01:00
Tim FreundandRaphael Michel 1c01e23867 Name presale index + unit test for URL names (#784)
* Name the default URL

If metrics collection is enabled, the index page of the site will fail
to load: without a name, the metrics middleware throws a TypeError.

* Test for names on all URLs

This test passes if all URLs have names. Without names, URLs will cause
the optional metrics middleware to throw a TypeError.
2018-02-26 10:17:42 +01:00
Raphael Michel 64b67e5396 Reduce number of calls to domain cache 2017-10-18 10:27:57 +02:00
Raphael Michel ab2084692d Cache organizer instance by domain 2017-10-18 10:27:57 +02:00
Raphael Michel 03133dc1fd Cache access to cache object 2017-10-18 10:27:57 +02:00
Raphael MichelandGitHub 43b5140754 New handling of plugin URLs (#609) 2017-08-29 10:01:50 +03:00
Raphael Michel 130f619b05 Fix raven integration 2017-07-17 20:29:56 +02:00
Raphael Michel 275d162b81 List of events: Optional calendar view 2017-07-08 22:50:48 +02:00
Raphael Michel bf5ea81b40 Ignore style in tests, change import order 2017-06-01 13:28:11 +02:00
Raphael Michel 031ed8f3cd Add new template tag abseventurl 2017-03-16 09:59:54 +01:00
Tobias KunzeandRaphael Michel e89fa4f7f9 Add PEP8 style empty lines in appropriate places (#321)
New flake8 version finds more (correct) issues.
2016-11-17 11:17:43 +01:00
Raphael Michel 50eb518d41 Remove debugging output 2016-11-08 17:27:39 +01:00
Raphael Michel 6adcf4bc7c Use more caching in multidomain module 2016-11-08 16:03:06 +01:00
Raphael Michel 5aa3ff0616 Require a session to be present at all times, not just in pretix.presale views 2016-11-03 15:32:06 +01:00
Raphael Michel fbd1c0d367 Django 1.10: URL configuration deprecations 2016-09-27 10:21:54 +02:00
Raphael Michel 965428e422 Django 1.10: New-style middlewares 2016-09-27 10:00:03 +02:00
Raphael Michel 6d894bf98c Custom 404 error view to handle translated error messages correctly 2016-09-26 19:01:38 +02:00
Raphael Michel 497663d0d8 Do not count coverage for a deprecated code path 2016-09-20 12:30:12 +02:00
Raphael Michel 11abf83a7f Added caching for eventreverse 2016-09-19 17:53:41 +02:00
Raphael Michel 0663bb902e Fixed a problem with plugin URL reversal
It turns out that django does not support multiple include() statements
that define the same namespace (only the first one will be used). But
there isn't a problem that can't be solved with another level of
indirection ;)
2016-08-15 15:35:32 +02:00
Raphael Michel 39ada8954e Added optional links to the order in emails 2016-08-04 17:56:07 +02:00
Raphael Michel 8dcb8193fa Added deprecation warning for old-style urlconfigs in plugins 2016-08-03 09:43:43 +02:00