<s> from django . utils . html import escape <EOL> from table . utils import Accessor <EOL> from . base import Column <EOL> class DatetimeColumn ( Column ) : <EOL> DEFAULT_FORMAT = "<STR_LIT>" <EOL> def __init__ ( self , field , header = None , format = None , ** kwargs ) : <EOL> self . format = format or DatetimeColumn . DEFAULT_FORMAT <EOL> super ( DatetimeColumn , self ) . __init__ ( field , header , ** kwargs ) <EOL> def render ( self , obj ) : <EOL> datetime = Accessor ( self . field ) . resolve ( obj ) <EOL> text = datetime . strftime ( self . format ) <EOL> return escape ( text ) </s>
