<s> from django . apps import apps <EOL> from django . template import Library <EOL> from . . api import get_last_invalidation as get_last_invalidation_function <EOL> register = Library ( ) <EOL> @ register . assignment_tag <EOL> def get_last_invalidation ( * tables_or_model_lookups , ** kwargs ) : <EOL> tables_or_models = [ ] <EOL> for table_or_model_lookup in tables_or_model_lookups : <EOL> if '<STR_LIT:.>' in table_or_model_lookup : <EOL> tables_or_models . append ( apps . get_model ( table_or_model_lookup ) ) <EOL> else : <EOL> tables_or_models . append ( table_or_model_lookup ) <EOL> return get_last_invalidation_function ( * tables_or_models , ** kwargs ) </s>
