<s> from django import template <EOL> from django . utils . safestring import mark_safe <EOL> from . . models import Project <EOL> register = template . Library ( ) <EOL> @ register . simple_tag ( name = "<STR_LIT>" ) <EOL> def status_label ( status ) : <EOL> css_map = { <EOL> "<STR_LIT>" : "<STR_LIT:success>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT:default>" <EOL> } <EOL> return mark_safe ( "<STR_LIT>" . format ( <EOL> css_class = css_map . get ( status , "<STR_LIT:default>" ) , <EOL> status = dict ( Project . STATUS_CHOICES ) . get ( status , "<STR_LIT>" ) <EOL> ) ) </s>
