Skip to content

Instantly share code, notes, and snippets.

View felixxm's full-sized avatar

Mariusz Felisiak felixxm

View GitHub Profile
@felixxm
felixxm / django5.0_contributors.md
Last active December 4, 2023 10:24
Django 5.0 Contributors

Django 5.0 contributors

Many thanks to the 204 who people contributed 💚 to Django 5.0 🎉 :

  • 4the4ryushin
  • Adam Johnson
  • Akash Kumar Sen
  • Albert Defler
  • Alberto Sottile
  • Alexandre Spaeth
Fatal Python error: Segmentation fault
Current thread 0x00007fb57b3b2740 (most recent call first):
File "/home/jenkins/workspace/pull-requests-oracle/database/oracle19/label/focal3/python/python3.11/django/views/debug.py", line 274 in get_traceback_frame_variables
File "/home/jenkins/workspace/pull-requests-oracle/database/oracle19/label/focal3/python/python3.11/django/views/debug.py", line 594 in get_exception_traceback_frames
File "/home/jenkins/workspace/pull-requests-oracle/database/oracle19/label/focal3/python/python3.11/django/views/debug.py", line 522 in get_traceback_frames
File "/home/jenkins/workspace/pull-requests-oracle/database/oracle19/label/focal3/python/python3.11/django/views/debug.py", line 350 in get_traceback_data
File "/home/jenkins/workspace/pull-requests-oracle/database/oracle19/label/focal3/python/python3.11/django/views/debug.py", line 428 in get_traceback_html
File "/home/jenkins/workspace/pull-requests-oracle/database/oracle19/label/focal3/python/python3.11/django/views

Wonderful world of the limitless Django Lookups

This talk will dive listeners into the wonderful world of the limitless Django ORM. We will present a detailed explanation of one of its key components, Lookups:

  • How it works?
  • What does the API behind it look like?
  • How it builds filter statements?
  • How to create our own lookups? (basic and advanced)

We will also show how to use Django 4.2+ feature of registering lookups on Field instances to organize and reuse complex logic in the ORM components instead of building complex querysets.

  • 0001_initial.py
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]
@felixxm
felixxm / gist:1890ed643dcbc416eb8dd747066ca49f
Created September 1, 2022 08:27
PR 15787 vs. the main branch
All benchmarks:
before after ratio
[b9705a70] [d4e2a88c]
<main>
348±10ms 312±20ms ~0.90 data_struct_benchmarks.multi_value_dict.benchmark.MultiValueDictBench.time_multi_value_dict [felixx/conda-py3.10]
- 427±40ms 329±1ms 0.77 data_struct_benchmarks.multi_value_dict.benchmark.MultiValueDictBench.time_multi_value_dict [felixx/conda-py3.8]
337±5ms 337±2ms 1.00 data_struct_benchmarks.multi_value_dict.benchmark.MultiValueDictBench.time_multi_value_dict [felixx/conda-py3.9]
37.1±1μs 35.7±3μs 0.96 form_benchmarks.form_clean.benchmark.FormClean.time_form_clean [felixx/conda-py3.10]
44.7±4μs 44.8±4μs 1.00 form_benchmarks.form_clean.benchmark.FormClean.time_form_clean [felixx/conda-py3.8]
#!/bin/bash
for file in `find -name urls.py`
do
sed -e 's/ url(/ re_path(/g' $file > $file.bck
mv $file.bck $file
echo $file
done
@felixxm
felixxm / keybase.md
Created April 12, 2019 12:21
keybase.md

Keybase proof

I hereby claim:

  • I am felixxm on github.
  • I am felixx (https://keybase.io/felixx) on keybase.
  • I have a public key whose fingerprint is ABB2 C2A8 CD01 F161 3618 B70D 2EF5 6372 BA48 CD1B

To claim this, I am signing this object: