<s> from django import template <EOL> from django . template . loader import render_to_string <EOL> from observatory . settings import DEBUG , JS_FILES , CSS_FILES <EOL> register = template . Library ( ) <EOL> CSS_LINK = "<STR_LIT>" <EOL> JS_LINK = "<STR_LIT>" <EOL> def head_tags ( ) : <EOL> if DEBUG : <EOL> return ( "<STR_LIT>" . join ( [ CSS_LINK . format ( file ) for file in CSS_FILES ] ) + <EOL> "<STR_LIT>" . join ( [ JS_LINK . format ( file ) for file in JS_FILES ] ) ) <EOL> else : <EOL> return ( CSS_LINK . format ( "<STR_LIT>" ) + <EOL> "<STR_LIT>" . join ( [ JS_LINK . format ( file ) for file in JS_FILES ] ) ) <EOL> register . simple_tag ( head_tags ) </s>
