You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
509 B
Python
14 lines
509 B
Python
1 year ago
|
def update_user_querydict(querydict):
|
||
|
new_querydict = dict()
|
||
|
if 'username' in querydict:
|
||
|
new_querydict['username__icontains'] = ''.join(querydict.pop('username'))
|
||
|
if 'phone_number' in querydict and querydict.get('phone_number') != ['']:
|
||
|
new_querydict['phone_number__icontains'] = ''.join(querydict.pop('phone_number'))
|
||
|
if 'status' in querydict and querydict.get('status') != ['']:
|
||
|
new_querydict['status'] = ''.join(querydict.pop('status'))
|
||
|
return new_querydict
|
||
|
|
||
|
|
||
|
|
||
|
|