code: def foreignkey(element, exceptions):
      '''
      function to determine if each select field needs a create button or not
      '''
      label = element.field.__dict__['label']
      try:
          label = unicode(label)
      except NameError:
          pass
      if (not label) or (label in exceptions):
          return False
      else:
          return "_queryset" in element.field.__dict_f foreignkey(element, exceptions):
      '''
      function to determine if each select field needs a create button or not
      '''
      label = element.field.__dict__['label']
      try:
          label = unicode(label)
      except NameError:
          pass
      if (not label) or (label in exceptions):
          return False
      else:
          return "_queryset" in element.field.__dict__
docs: function to determine if each select field needs a create button or not