500 error while viewing models after login

Hello everyone,

Not sure where to start here, so I’ll just describe my situation as explicitly as I can. I am not overly familiar with SQL, I would really like to be able to connect my django apps to existing databases. I am able to login, django admin page displays the name of the table, If I click on the table name I get a 500 error.

I would really like to tackle this without changing my overall config, I think this can work, but if any one has any pointers of how I could better accomplish this with a different set up, please share.

Here is my setup:

curl → pandas → sqlalchemy → postgresql ← → django ← → uwsgi ← → nginx

Here is what I think is relevant:

  • The table is instantiated at with sqlalchemy, with a function in pandas.
  • So the postgres db is set up with the data I want (names and emails). Everything is fine there.
  • Django is able to read the table using manage.py inspectdb I append stdout to app/models.py
  • I changed the model classes to models.CharField, set the managed flag on and off. Used different table names each time so I can see them rendered on admin page.
  • Every other aspect of the admin site is working, but if I click on my new models I get 500 error.

Also, I am able to open link to add a new item, but I get 500 when I hit submit.

There were a few things I thought to try while writing this, such as running shell and see if I could query the db. If I gain any new info I will update.


This appears to be a duplicate of Server 500 Error while trying to view models. I’m assuming this was the temporarily-blocked post. See the other post for replies.