<s> from django import template <EOL> register = template . Library ( ) <EOL> @ register . inclusion_tag ( '<STR_LIT>' ) <EOL> def label ( field ) : <EOL> """<STR_LIT>""" <EOL> return { '<STR_LIT>' : field } <EOL> @ register . inclusion_tag ( '<STR_LIT>' ) <EOL> def field ( field , is_admin = True , show_label = True ) : <EOL> """<STR_LIT>""" <EOL> return { <EOL> '<STR_LIT>' : field . field if is_admin else field , <EOL> '<STR_LIT>' : field , <EOL> '<STR_LIT>' : show_label <EOL> } <EOL> @ register . inclusion_tag ( '<STR_LIT>' ) <EOL> def field_alone ( field ) : <EOL> """<STR_LIT>""" <EOL> return { '<STR_LIT>' : field , '<STR_LIT>' : False } <EOL> @ register . inclusion_tag ( '<STR_LIT>' ) <EOL> def errors ( form ) : <EOL> """<STR_LIT>""" <EOL> return { '<STR_LIT>' : form } </s>
