'Django: how to get the value inside a querydict?

I have the following querydict:

 <QueryDict: {'data_dict[user_id]': ['5'], 'data_dict[location]': ['Library'], 'data_dict[item_sold]': ['book']}>

I want to get the value by using the key: i.e (x = data_dict.get('user_id')

How can I do that? everytime I try to access the querydict it throws errors.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source