Remove a prefix.

def remove_prefix(self, id):
        """ Remove a prefix.
        """

        try:
            p = Prefix.get(int(id))
            p.remove()

        except NipapError, e:
            return json.dumps({'error': 1, 'message': e.args, 'type': type(e).__name__})

        return json.dumps(p, cls=NipapJSONEncoder)