title: Another "fk_name ' ' is not a foreignkey to" problem [Python/Django]
body: <p>please don't judge with my question. I tried every suggestion here but still no luck.</p>
  <p>here's my code ---</p>
  <p>admin.py</p>
  <pre><code>from django.contrib import admin
  from .models import candidates_info, address
  
  class addressInline(admin.TabularInline):
    model = address
    fk_name = 'id'
  
  @admin.register(candidates_info)
    class candidates_infoAdmin(admin.ModelAdmin):
    fields =['last_name', 'first_name', 'middle_name', 'moniker']
    inlines = [addressInline]
  </code></pre>
  <p>models.py</p>
  <pre><code>import datetime
  from django.db import models
  from django.utils import timezone
  
  class candidates_info (models.Model):
    last_name = models.CharField(max_length=50)
    first_name = models.CharField(max_length=50)
    middle_name = models.CharField(max_length=50)
    #position = models.ForeignKey('positions', db_column='position_id', on_delete=models.CASCADE, null=False)
    #birth_date = models.ForeignKey('birthdate', db_column='date_of_birth_id', on_delete=models.CASCADE, null=False)
    #contact_info = models.ForeignKey('contact_info', db_column='contact_info_id', on_delete=models.CASCADE)
    addr = models.ForeignKey('address', on_delete=models.SET_NULL, null=True)
    moniker = models.CharField(max_length=35)
    #party = models.ForeignKey('political_parties', db_column='political_parties_id', on_delete=models.CASCADE, null=False)
    registration_dt = models.DateTimeField('date registered')
  
  class address(models.Model):    
    lot_no = models.DecimalField(max_digits=5, decimal_places=0)
    block_no = models.DecimalField(max_digits=5, decimal_places=0)
  </code></pre>
  <p>note: the codes commented out (#) are part of my code in models.py which I temporarily disabled as part of my code to see if it's conflicting with the declaration of foreignKey.</p>
  <p>and another thing, tried declaring and undeclaring fk_name on admin.py but still no luck. Please help guys. Been stock here for a few days now. I can't seem to find the bug.</p>
  <p>TIA</p>
  <p>btw.. here's the error from console ---</p>
  <p>&lt;class 'votenow.admin.addressInline'&gt;: (admin.E202) fk_name 'id' is not a ForeignKey to 'votenow.candidates_info'.</p>