Could also use rsplit here:

    try:
        module, class_name = import_path.rsplit('.', 1)
    except ValueError:
        raise ImportError("%s isn't a Python path." % import_path)

I'm a little surprised Django doesn't already have an import_class() utility.