title: Extending admin user profile in Django
body: <p>I want to store database users in admin page with admin authentications. For this aim, I need to modify UserAdmin fields for storing more columns. But I am receiving below error:</p>
  
  <p>DatabaseError at /admin/auth/user/1/change/<br>
  ORA-00904: "PROFILE"."USER_ID": invalid identifier</p>
  
  <p>app name profiles, class name is profile. here is the code: </p>
  
  <p>models.py</p>
  
  <pre><code>class profile(models.Model):
      user = models.OneToOneField(User,on_delete=models.CASCADE,null=True,blank=False)
      id = models.FloatField(primary_key=True)
      ip = models.CharField(max_length=20, blank=True, null=True)
      ad = models.CharField(max_length=20, blank=True, null=True)
      soyad = models.CharField(max_length=20, blank=True, null=True)
      username = models.CharField(max_length=200, blank=True, null=True)
      password = models.CharField(max_length=200, blank=True, null=True)
      role = models.FloatField(blank=True, null=True)
      email = models.CharField(max_length=2000, blank=True, null=True)
      parent_username = models.CharField(max_length=2000, blank=True, null=True)
      notif_ask = models.CharField(max_length=3, blank=True, null=True)
      notif_answer = models.CharField(max_length=3, blank=True, null=True)
      department = models.CharField(max_length=100, blank=True, null=True)
      position = models.CharField(max_length=50, blank=True, null=True)
      internal_tel_num = models.CharField(max_length=30, blank=True, null=True)
      mob_tel_num = models.CharField(max_length=50, blank=True, null=True)
      image = models.CharField(max_length=300, blank=True, null=True)
      ata_adi = models.CharField(max_length=20, blank=True, null=True)
  
      class Meta:
          managed = True
          db_table = 'profile'
  
      def __str__(self):
          return self.user.username
  
      def __unicode__(self):
          return self.user.username
  
      @receiver(post_save, sender=User)
      def create_or_update_user_profile(sender, instance, created, **kwargs):
          if created:
              profile.objects.create(user=instance)
              instance.profile.save()
  </code></pre>
  
  <p>admin.py</p>
  
  <pre><code>class ProfileInline(admin.StackedInline):
      model = profile
      can_delete = False
      verbose_name_plural = 'profile'
      fk_name = 'user'
  
  class CustomUserAdmin(UserAdmin):
      inlines = (ProfileInline, )
  
      def get_inline_instances(self, request, obj=None):
          if not obj:
              return list()
          return super(CustomUserAdmin, self).get_inline_instances(request, obj)
  
  admin.site.unregister(User)
  admin.site.register(User, CustomUserAdmin)
  </code></pre>