def time_range ( from_ = None , to = None ) : # todo datetime conversion args = locals ( ) return { k . replace ( '_' , '' ) : v for k , v in args . items ( ) }
how do you give python range in django
: param str from_ : : param str to :
def time_range(from_=None, to=None):  # todo datetime conversion
    """
    :param str from_:
    :param str to:

    :return: dict
    """
    args = locals()
    return {
        k.replace('_', ''): v for k, v in args.items()
    }