After the presentation yesterday evening, and Cal Anderson showing Pownce’s debug toolbar for a moment, it seemed like a great idea to create a pluggable out of it. It turned out I wasn’t the only one with this idea.
I ended up creating a few “panels” inside of an overlay toolbar, which showed things like SQL [...]
Below you will find resources from my presentation on High Performance Django.
Slides
Profiling Middleware
Template Engine Benchmarks: Real-world Example, Benchmark Testcase
One of the tasks that seems to come up every single project we do, is changing the auth backend to accept email addresses. Since it’s such a common task for us, it can’t be that rare to want this functionality. So, here’s a quick and simply backend which accomplishes this, using the built-in django.contrib.auth module.
from [...]
One of the tasks that I seem to repeatedly do across multiple projects, is extend the built-in paginator from Django. The built-in is fairly nice, but it’s quite honestly extremely confusing as you have to pass around a paginator instance as well as a paginator.page() instance in order to get useful pagination inside of a [...]
I was helping someone today in the Django IRC channel and the question came across about storing a denormalized data set in a single field. Typically I do such things by either serializing the data, or by separating the values with a token (comma for example).
Django has a built-in field type for CommaSeparatedIntegerField, but most [...]
I was working on our search for the new iBegin today, which utilizes Sphinx, Django, and obviously, django-sphinx. Being the person who hates doing tedious work, I found a few issues in the newly done configuration generation.
Errors hardcore in 0.98
It wasn’t generating attributes for floats (latitude/longitude)
Didn’t work with custom index names
So tonight, after a few [...]
I’ve been annoyed for the last 6 months of using Jinja, as I’ve been working on numerous different Django projects, and I’ve had to use django-admin.py vs manage.py. The reason for this is simply, that in my settings.py I had used the djangosupport.configure() routine. I tried moving it to other locations, but they didn’t seem [...]
I posted another one of my small pluggable apps up on Google code the other day. It’s called django-object-view-tracking and is most suited for tracking things such as if a user has viewed a thread in a forum.
The API is fairly simple, but may need some improvements based on feedback:
def view_thread_list(request):
threads [...]
I pushed an update to the django-sphinx repository tonight which includes a sample configuration generation tool.
It allows you to generate a source and index config for a Model based on it’s field type. For example:
from nibbits.maps.models import Map
import djangosphinx
output = djangosphinx.generate_config_for_model(Map)
print output
This will give you something like:
source base
{
type [...]
I’m going to be giving a talk at DjangoCon, “High Performance Django”. I will be discussing what I’ve done at the past with Curse.com, what we do presently for iBegin’s Crazy Datastore, and general tips for scalability and performance in large web applications.
So why am I telling you all of this? I’m interested in hearing [...]