(instance, action, prefix=None, namespace=None,
             additional_kwargs=None)
return reverse(url, kwargs=additional_kwargs)
Shortcut function returns url for instance and action passing `pk` kwarg.

    Example:

        crud_url(author, 'update')

    Is same as:

        reverse('testapp_author_update', kwargs={'pk': author.pk})
Shortcut function returns url for instance and action passing `pk` kwarg.
Shortcut function returns url for instance and action passing pk kwarg .
def crud_url(instance, action, prefix=None, namespace=None,
             additional_kwargs=None):
    """
    Shortcut function returns url for instance and action passing `pk` kwarg.

    Example:

        crud_url(author, 'update')

    Is same as:

        reverse('testapp_author_update', kwargs={'pk': author.pk})
    """
    if additional_kwargs is None:
        additional_kwargs = {}
    additional_kwargs['pk'] = instance.pk
    url = crud_url_name(instance._meta.model, action, prefix)
    if namespace:
        url = namespace + ':' + url
    return reverse(url, kwargs=additional_kwargs)
def crud_url ( instance , action , prefix = None , namespace = None , additional_kwargs = None ) : if additional_kwargs is None : additional_kwargs = { } additional_kwargs [ 'pk' ] = instance . pk url = crud_url_name ( instance . _meta . model , action , prefix ) if namespace : url = namespace + ':' + url return reverse ( url , kwargs = additional_kwargs )