Skip to content

Instantly share code, notes, and snippets.

ogier / PKGBUILD
Created July 18, 2012 21:54
keepassx-git updated AUR files
#Maintainer: Paolo Stivanin <admin AT polslinux DOT it>
pkgdesc="The newest KeepassX v2!"
arch=('i686' 'x86_64')
makedepends=('git' 'intltool' 'cmake')
ogier / django-rebase.markdown
Created April 29, 2012 11:55
How to safely rebase all your Django branches.

Here is a quick primer on how to update your branches to track the new django/django git repository. The commands that follow assume that you have your own fork of django/django-old, and that you have this cloned locally, as the origin remote.

Following these steps shouldn't break anything. So long as all your changes are committed and pushed to your fork of django-old already, nothing will affect them. If you are concerned, you can run them in a fresh clone of your fork.


First, add all of the new commits from the new Django repository.

$ git remote add django-new
ogier /
Created April 4, 2012 18:05
GSoC 2012: auth.User replacement

GSoC 2012: auth.User replacement

Alex Ogier
Rising Senior, Princeton University

Technical Details

The scope of this project is to break any hard ties to the auth.User model, and allow Django developers to cleanly specify alternate models to be used instead.

ogier /
Created April 3, 2012 05:03
auth.User: A sane replacement strategy.

Replacing auth.User with as little magic as possible

Here is my proposal for replacing auth.User in a sane, backwards-compatible, non-magical fashion.

  1. Split off the current functionality of auth.User into reusable components. Proof of concept that this can be done transparently is available: . The changes there, with independent password, profile, groups/permissions and identity support being shipped as abstract models, are totally transparent to Django's test suite.
  2. Ask users to reimplement a User model if they want to change anything. This, while arguably invasive, already has precedent in nearly every other batteries-included framework out there (See Ruby on Rails, ASP.NET MVC, Play, etc.). In addition, this has the advantage of making AUTH_PROFILE a dinosaur. Why implement a one-to-one model accessible indirectly via method on auth.User when you can just stick your fields where they belong.
  3. Break any hard d
ogier / settings.template
Created March 7, 2012 21:17
Sane way to manage Django settings
# Local settings (stuff that is unique per deployment). Checked into source control.
# To deploy, copy settings.template to and modify to taste.
from settings_common import *
DEBUG = True
'default': {
ogier /
Created February 29, 2012 06:00
Privacy test
echo "Leaked my email?"
git log -n 1 --pretty=format:%ae