

def get_prefix(self, model):
    if (not hasattr(self.__class__, '_prefixmap')):
        self.__class__._prefixmap = dict(((m, p) for (p, m) in settings.SHORTEN_MODELS.items()))
    key = ('%s.%s' % (model._meta.app_label, model.__class__.__name__.lower()))
    return self.__class__._prefixmap[key]

dataset/ETHPy150Open bfirsh/django-shorturls/src/shorturls/templatetags/shorturl.py ShortURL.get_prefix/original