Skip to content

psycopg2.errors.UndefinedTable: relation "sso_server_consumer" does not exist  #50

@saikrishnavadali05

Description

@saikrishnavadali05

I am working on implementing Django-Simple-SSO to our python based platform. I am following this blog to implement SSO:

https://medium.com/@MicroPyramid/django-single-sign-on-sso-to-multiple-applications-64637da015f4

This code is the step number 3 on the server side of django-simple-sso.

from simple_sso.sso_server.models import Token, Consumer

Consumer.objects.create(public_key='your_application_public_key', private_key='your_application_private_key', name='your_application_name')

psycopg2.errors.UndefinedTable: relation "sso_server_consumer" does not exist -- this is the error I am getting as soon as I run the above code in django shell. Can someone please help me on how to solve this error?

I have run both makemigrations and migrate commands. But, still getting the same error.

I am able to see the Consumers table in the django-admin page under the heading SSO_SERVER. But, when I click on that Consumers table, I am getting this error page :

ProgrammingError at /admin/sso_server/consumer/ relation "sso_server_consumer" does not exist LINE 1: SELECT COUNT(*) AS "__count" FROM "sso_server_consumer"
And also why is that Token imported? As it was not used anywhere in that sso blog post.

I have asked this question on stackoverflow as well : https://stackoverflow.com/questions/64281534/psycopg2-errors-undefinedtable-relation-sso-server-consumer-does-not-exist
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions