@contextfunction
def model_url(context, model, kind='detail', default=None):
 user = context.get('user')
 try:
  return get_model_url(model, kind=kind, user=user)
 except NoModelUrl:
  return default

@ contextfunction def model_url ( context , model , kind = 'detail' , default = None ) : user = context . get ( 'user' ) try : return get_model_url ( model , kind = kind , user = user ) except NoModelUrl : return default
get a model url of the given kind for a model .