Skip to content

Instantly share code, notes, and snippets.

View rixx's full-sized avatar

Tobias Kunze rixx

View GitHub Profile
@rixx
rixx / debug.py
Last active May 16, 2025 10:24
Django: Start debugger on query
# Use: wrap methods:
# @breakpoint_on_query()
# Or use as `with breakpoint_on_query():`
from contextlib import contextmanager
@contextmanager
def breakpoint_on_query():
from django.db import connection
def instrument(execute, sql, params, many, context):
# Optional: match only specific queries, e.g.
@rixx
rixx / static.md
Last active October 9, 2025 22:06
pretalx 2025.2.0 plugin migration notes

pretalx 2025.2.0 plugin migration notes

In pretalx 2025.2.0, a lot of static files (stylesheets and script files) have changed their name and location. The main reason for this is that our static files had grown for a long time without a lot of structure. As a result, we included a lot of styles on all pages, even when we didn't need them. This made pages larger and page loads slower than they needed to be. Once we started the cleanup, we decided to also move files to a more consistent naming and directory scheme. Sorry.

Please also note that pretalx now does not support SCSS out of the box anymore. If your plugin requires SCSS files to be processed, you will have to make sure that they are processed to CSS files.