Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
saikrishnavadali05 opened this issue Oct 12, 2020 · 1 comment

Comments

@saikrishnavadali05
Copy link

saikrishnavadali05 commented Oct 12, 2020

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

@Hardeepsingh980
Copy link

Hardeepsingh980 commented Nov 6, 2020

please make sure you have added 'simple_sso.sso_server' in your installed apps and run python manage.py migrate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants