def frontend_urlname(model, url_type):
    """
    Retrieve URL for a model.

    Suitable for use with {% url %} template tag

    Example::

        {% url view.model|frontend_urlname:'list' %}
        {% url view.model|frontend_urlname:'detail' object.pk %}

    """
    return '{}:{}_{}'.format(model._meta.app_label, model._meta.model_name, url_type)