title: Get the FK attributes of a model , if a model is passed
body: <p>I have the following Model(s):</p>
  
  <pre><code>class Comp(models.Model):
        ....
         is_active = models.BooleanField(default=False)
  
  class Item(models.Model):
  
        comp = models.ForeignKey(Comp, blank=True, null=True, related_name='items', on_delete=models.CASCADE)
          romp = models.ForeignKey(Romp, blank=True, null=True, related_name='items', on_delete=models.CASCADE)
          is_active = models.BooleanField(default=False)
  </code></pre>
  
  <p>I want to write a generic Model <code>clean</code> method,to check for <code>non Null</code> Foreign Keys of a Model, if their <code>is_active=True</code></p>
  
  <p>I want to inherit this method over multiple Models(using abstract Model)</p>
  
  <p>In the code below I check each model attribute over a general list of FKs</p>
  
  <pre><code>def clean(self, *args, **kwargs):
      ....
              for attr in FK_LIST:
                  if hasattr(self, attr):
                      fk_obj = getattr(self, attr)
                      if not fk_obj.active:
                          raise ValidationError({'is_active': 'The {} {} needs to be active first'
                                                .format(type(fk_obj).__name__, fk_obj.name)})
  </code></pre>
  
  <p>There 2 issues with my code:</p>
  
  <ol>
  <li>I have two manually maintain a list of FKs name</li>
  <li>I need to loop thru all attributes instead of checking just FKs</li>
  <li>Instead of having an implicit FK_list to check in, I prfer to have an exclude list(easy to maintain):
  Check all FK on the model that are not NULL or in Exclude_list</li>
  </ol>