title: How to set default value in Django while filtering objects from models
body: <p>I am trying to create one function where I am expecting user to enter some details and on the basis of that I need to filter out those data and return it.</p>
  
  <p>For example if in my model name Profile I have:</p>
  
  <p>Name. age, gender then I am trying to do:</p>
  
  <p><code>Profile.objects.filter(name=name, age=age, gender=gender)</code></p>
  
  <p>name, age and gender are values which will be provided by user. Now if user types name = 'Shashank' and leaves age and gender blank then I need to query it like:</p>
  
  <p><code>Profile.objects.filter(name='Shashank')</code></p>
  
  <p>While ignoring all those blank values. So I am not sure how to achieve such kind of behaviour. What type of inital value I can set so that it doesn't effect the search result.</p>
  
  <p><code>Profile.objects.filter(name='Shashank', age=&lt;VALUE&gt;, gender=&lt;VALUE&gt;)</code></p>
  
  <p>Where <code>&lt;VALUE&gt;</code> can be ignored by filter function.</p>
  
  <p>NOTE: I don't want to write all the possible combination of filter statement because it will be not convenient.</p>
  
  <p>I tried using <code>None</code>, <code>False</code> but it was giving wrong result</p>