app/soc/views/helper/templatetags/forms_helpers.py
changeset 1964 96e45d34ee71
parent 1820 ecc40aa58e19
child 1977 2dab2aac313d
equal deleted inserted replaced
1963:81a5926b6109 1964:96e45d34ee71
    38 
    38 
    39 
    39 
    40 register = template.Library()
    40 register = template.Library()
    41 
    41 
    42 
    42 
       
    43 @register.inclusion_tag('soc/templatetags/_as_user.html')
       
    44 def as_user(user):
       
    45   """Prints a user as a hyperlinked link_id.
       
    46   """
       
    47 
       
    48   return {'user': user}
       
    49 
       
    50 
    43 @register.inclusion_tag('soc/templatetags/_field_as_table_row.html')
    51 @register.inclusion_tag('soc/templatetags/_field_as_table_row.html')
    44 def field_as_table_row(field):
    52 def field_as_table_row(field):
    45   """Prints a newforms field as a table row.
    53   """Prints a newforms field as a table row.
    46 
    54 
    47   This function actually does very little, simply passing the supplied
    55   This function actually does very little, simply passing the supplied