Delegating a subdomain with Rackspace Cloud DNS
Currently the rackspace cloud control panel won’t let you delegate a DNS subodmain. When you add a record and set the type to NS, the hostname field is fixed so you can only delegate the whole domain: This didn’t…
Django RemoteUserBackend for REMOTE_USER authentication and LDAP authorisation.
This class was written to integrate a django app with our LDAP/Kerberos setup. Apache handles Kerberos and passes the name of an authorised user via the REMOTE_USER variable. This script does a simple LDAP lookup to determine if the user…
Django Middleware Order
I got stung by this today. I was presented with the following error: The Django remote user auth middleware requires the authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert ‘django.contrib.auth.middleware.AuthenticationMiddleware’ before the RemoteUserMiddleware class. Even though my…
Creating a debian package from a python distutils package
This is the process for converting a python package into a debian package, this is helpful when runnign a debian system, as you can then manage python modules with standard debian package management tools. Install python-stdeb Convert python package to…