<s> from django import template <EOL> from livesettings import config_get_group <EOL> from satchmo_utils . templatetags import get_filter_args <EOL> register = template . Library ( ) <EOL> def order_details ( context , order , default_view_tax = False ) : <EOL> """<STR_LIT>""" <EOL> return { '<STR_LIT>' : order , <EOL> '<STR_LIT>' : default_view_tax , <EOL> '<STR_LIT>' : context [ '<STR_LIT>' ] <EOL> } <EOL> register . inclusion_tag ( '<STR_LIT>' , takes_context = True ) ( order_details ) <EOL> def order_tracking_details ( order , paylink = False , default_view_tax = False ) : <EOL> """<STR_LIT>""" <EOL> return { '<STR_LIT>' : order , <EOL> '<STR_LIT>' : default_view_tax , <EOL> '<STR_LIT>' : paylink } <EOL> register . inclusion_tag ( '<STR_LIT>' ) ( order_tracking_details ) <EOL> def order_variable ( order , args ) : <EOL> """<STR_LIT>""" <EOL> args , kwargs = get_filter_args ( args ) <EOL> if not len ( args == <NUM_LIT:1> ) : <EOL> raise template . TemplateSyntaxError ( "<STR_LIT>" % ( args [ <NUM_LIT:0> ] , args ) ) <EOL> return order . get_variable ( args [ <NUM_LIT:0> ] ) <EOL> register . filter ( order_variable ) <EOL> @ register . filter <EOL> def order_payment_methods ( order ) : <EOL> """<STR_LIT>""" <EOL> return ( config_get_group ( '<STR_LIT>' % p . payment ) . LABEL . value <EOL> for p in order . payments . all ( ) ) </s>
