<s> from django import template <EOL> from django . template . defaultfilters import stringfilter <EOL> from common . util import create_nonce , safe <EOL> register = template . Library ( ) <EOL> @ register . filter ( name = "<STR_LIT>" ) <EOL> def nonceparam ( value , arg ) : <EOL> nonce = create_nonce ( value , arg ) <EOL> return "<STR_LIT>" % nonce <EOL> @ register . filter ( name = "<STR_LIT>" ) <EOL> @ safe <EOL> def noncefield ( value , arg ) : <EOL> nonce = create_nonce ( value , arg ) <EOL> return '<STR_LIT>' % nonce </s>
