Posts Tagged ‘django’

Timing AMO user experience

There are lots of ways to measure the performance of a site. On addons.mozilla.org we measure a few of them: how long it takes to render pages, the cache performance and responsiveness for content delivery networks globally. But with the advent of the navigation timing API in Firefox 7 we've been able to add the most important measurement of all - the actual performance in the browser. Along with a few other Mozilla sites, we've been using pystatsd and Graphite for a while. This produces useful graphs of the site health and performance. For example, this graph ... Read More »


Scrubbing your Django database

This is the second in a series of posts, focusing on issues around open sourcing your Django site and data privacy in Django. You'll end up with production data in your Django database and that will likely contain different kinds of data such as: configuration data, required basic data (categories for example), collected data and personal user data. There's a couple of reasons for taking that production data and copying it off your production servers: for developers and contributors you want a sample copy of the app with some key data in. for testing or staging servers, you might want to copy ... Read More »


Open sourcing your Django site

This is the first in series of posts, focusing on issues around open sourcing your Django site and data privacy in Django. A lot of people focus on open sourcing their Django libraries, but at Mozilla we open source the entire site. Releasing your entire source code can lead to a few problems, firstly let's look at your Django settings file. Separating your settings All Django sites come with a settings.py file. This file contains some key settings that you should not be releasing to the general public, such as database configuration and the secret key. The simple way to do ... Read More »


Django and AJAX image uploads

Note: this is a repost from my blog. You can find the original post here. This is my first post to the Mozilla WebDev blog. Woot, exciting! Table of contents: Demo Summary Server side (Django) Model Form View Generating the thumbnail with PIL Client side Graceful degradation Demo Screencast Screenshots: The upload form, empty and ready for action: Browsing for an image: Uploading the image (in progress): The image is uploaded:... Read More »


from zope import django: persistence

Having recently come from the Plone world to join Mozilla, I am in the delicious but fleeting position to compare two major Python web frameworks with some pretension of familiarity. Through a series of articles focusing on specific features, I will compare the Zope family of frameworks (as they are used in Plone) with the Django framework, which is gaining popularity at Mozilla and currently runs support.mozilla.com and addons.mozilla.com. Read More »


django-mozilla-product-details, because short library names are for wimps

Today, we have released a new library to consume Mozilla product details as well as language details from Django projects. Read More »


New Python Library: Bleach

We've released another Python library: Bleach, for sanitizing HTML and automatically linking URLs in text, that we're using on addons.mozilla.org and support.mozilla.com. It's based on html5lib, which we chose because of its foundation in web standards and its active development community. Bleach is available on Github and PyPI. Bleach uses a tree-walking approach to automatically link URLs that I think is pretty interesting. I wrote a short post outlining the method. Read More »