def __init__(self, view_name, url_kwarg=None, query_kwarg=None, **kwargs):
    assert ((url_kwarg is not None) or (query_kwarg is not None)), 'The `url_kwarg` argument is required.'
    kwargs['lookup_field'] = kwargs.get('lookup_field', self.lookup_field)
    self.url_kwarg = url_kwarg
    self.query_kwarg = query_kwarg
    super(QueryField, self).__init__(view_name, **kwargs)
def __init__(self, view_name, url_kwarg=None, query_kwarg=None, **kwargs):
    assert ((url_kwarg is not None) or (query_kwarg is not None)), 'The `url_kwarg` argument is required.'
    kwargs['lookup_field'] = kwargs.get('lookup_field', self.lookup_field)
    self.url_kwarg = url_kwarg
    self.query_kwarg = query_kwarg
    super(QueryField, self).__init__(view_name, **kwargs)