Sorry I wasn’t clear. I left everything as is in the table. The one you are referring to was the very first table I made.
I forget the error it gave, but you are correct and that failed miserably. I couldn’t even figure out how to query it in postgres.
I have that table unregistered from the admin site and deleted from models.py.
Also after looking through every log I could find, I re-read the doc page about logging and found how to write the log to a file. Will update with that soon. But I think my database schema may be an issue. I never configured one. So new tables default to the public schema.
models.py (in its present state)
from django.db import models
class Records(models.Model):
ids = models.TextField(db_column='Ids', blank=True, null=True) # Field name made lowercase.
last_name = models.CharField(max_length=100,db_column='Last Name', blank=True, null=True) # Field name made lowercase. Field renamed to remove unsuitable characters.
first_name = models.CharField(max_length=100,db_column='First Name', blank=True, null=True) # Field name made lowercase. Field renamed to remove unsuitable characters.
email = models.EmailField(max_length=100,db_column='Email', blank=True, null=True) # Field name made lowercase.
areas = models.TextField(db_column='Areas', blank=True, null=True) # Field name made lowercase.
class Meta:
managed = True
db_table = 'records'
from the postgres cli
\dpublic.records
Access privileges
Schema | Name | Type | Access privileges | Column privileges | Policies
--------+-----------------------------------+----------+-----------------------+-------------------+----------
public | Main_Table | table | | |
public | Mon May 24 19:27:49 2021 | table | | |
public | auth_group | table | | |
public | auth_group_id_seq | sequence | | |
public | auth_group_permissions | table | | |
public | auth_group_permissions_id_seq | sequence | | |
public | auth_permission | table | | |
public | auth_permission_id_seq | sequence | | |
public | auth_user | table | | |
public | auth_user_groups | table | | |
public | auth_user_groups_id_seq | sequence | | |
public | auth_user_id_seq | sequence | | |
public | auth_user_user_permissions | table | | |
public | auth_user_user_permissions_id_seq | sequence | | |
public | django_admin_log | table | | |
public | django_admin_log_id_seq | sequence | | |
public | django_content_type | table | | |
public | django_content_type_id_seq | sequence | | |
public | django_migrations | table | | |
public | django_migrations_id_seq | sequence | | |
public | django_session | table | | |
public | main_table | table | | |
public | maintable | table | robot=arwdDxt/arobot | |
public | records | table | | |
(24 rows)
It does look like robot Doesnt have access privileges on “records”. To be clear, I had similar results with maintable
models.py (“maintable” version)
class Maintable(models.Model):
ids = models.TextField(db_column='Ids', blank=True, null=True) # Field name made lowercase.
last_name = models.TextField(db_column='Last Name', blank=True, null=True) # Field name made lowercase. Field renamed to remove unsuitable characters.
first_name = models.TextField(db_column='First Name', blank=True, null=True) # Field name made lowercase. Field renamed to remove unsuitable characters.
email = models.TextField(db_column='Email', blank=True, null=True) # Field name made lowercase.
areas = models.TextField(db_column='Areas', blank=True, null=True) # Field name made lowercase.
class Meta:
managed = False
db_table = 'maintable'