title: Django Inline Autocomplete
body: <p>Is it possible to filter an inline autocomplete field by a dynamic value entered by a user?</p>
  
  <p>For example, I have a an admin form where staff enters games information including home and visiting team, game date and time, score, etc. They also enter individual player names and stats. I would like to add a filter to show only the players on either the home or visiting team.</p>
  
  <p>I am using the <a href="http://jannisleidel.com/2008/11/autocomplete-form-widget-foreignkey-model-fields/" rel="nofollow">InlineAutocompleteAdmin</a> module, which provides autocomplete hints for input fields.</p>
  
  <p>Here is the current inline autocomplete code:</p>
  
  <pre><code>class IndividualFootballGameInline(InlineAutocompleteAdmin):
      model = IndividualFootballGame
      extra = 1
      related_search_fields = {
          'player': ('player__first_name', 'player__last_name', '#team__sport__sport=Football', '#team__season__season_start_date__year=' + str(get_current_season_start_year('football'))),
      }
  </code></pre>
  
  <p>If this can be accomplished, can you explain how?</p>