A timeline view in Django
Explains how to create an efficient timeline view in Django by merging multiple sorted querysets to minimize database queries.
Alex Gaynor is a software resilience engineer focused on building reliable, secure systems across government, industry, and open source. He writes about software security, serialization, benchmarks, and the economics of open-source infrastructure.
121 articles from this blog
Explains how to create an efficient timeline view in Django by merging multiple sorted querysets to minimize database queries.
A developer considers replacing his laptop with a netbook for portability and a desktop for power, weighing the pros and cons of each device.
A developer provides an update on their custom programming language's compiler, detailing progress, challenges with integer overflow, and generated C++ code.
A developer explains the shortcomings of Python's easy_install tool and proposes using native system package managers instead.
Argues that perfectly uncoupled code is impossible, using Django's ORM and admin as examples of necessary coupling to specific APIs.
Explores how Python's design, inspired by economic incentives, enforces best practices like readability and secure coding to benefit developers long-term.
A guide on setting up and running the Django test suite for development and patch testing.
A developer highlights key upcoming features in Django 1.1, including ORM aggregation, model validation, and class-based generic views.
A collection of useful Python tips and tricks, including chained comparisons, dictionary instantiation, and the turtle graphics module.
A discussion on the risks and benefits of using Django's undocumented internal APIs, with advice on managing compatibility.
A technical deep dive into Django's internal model system, explaining the add_to_class and contribute_to_class methods.
A developer shares his essential open-source software stack for daily work on Ubuntu, including Python, Django, and various productivity tools.
A technical deep dive into how Django models work internally, focusing on the ModelBase metaclass and the class creation process.
Part 3 of a PLY tutorial covering arithmetic operations, operator precedence, and adding variables to a custom language.
A tutorial on building a grammar and interpreter using the PLY parsing library for Python, focusing on creating a calculator.
A tutorial on using the PLY (Python Lex-Yacc) library to tokenize source code, covering token definition and lexer creation.
A critique of the PHP programming language used on Obama's change.gov site, advocating for modern frameworks like Django or Rails.
A developer shares their journey building a compiled programming language using Python and the PLY library, discussing design goals and challenges.
A technical guide on using Python's multiprocessing library with PyGTK to offload intensive calculations from the main GUI thread.
A technical guide on creating a generic LazyForeignKey field in Django to simplify foreign key relationships and add custom manager functionality.