@register.tag('timezone')
def timezone_tag(parser, token):
 bits = token.split_contents()
 if (len(bits) != 2):
  raise TemplateSyntaxError(("'%s' takes one argument (timezone)" % bits[0]))
 tz = parser.compile_filter(bits[1])
 nodelist = parser.parse(('endtimezone',))
 parser.delete_first_token()
 return TimezoneNode(nodelist, tz)

@ register . tag ( 'timezone' ) def timezone_tag ( parser , token ) : bits = token . split_contents ( ) if ( len ( bits ) != 2 ) : raise TemplateSyntaxError ( ( "'%s' takes one argument (timezone)" % bits [ 0 ] ) ) tz = parser . compile_filter ( bits [ 1 ] ) nodelist = parser . parse ( ( 'endtimezone' , ) ) parser . delete_first_token ( ) return TimezoneNode ( nodelist , tz )
enables a given time zone just for this block .