def querydict_to_dict(qdict):
    """
    Converts Django QueryDict with structure {key: [value]} to a normal dict, {key: value}.
    """
    result = dict(qdict)
    try:
        result = {k: v[0] for k, v in result.items()}
    except IndexError:
        pass

    return result