0

I am trying to connect PostgreSQL database with my new project, I did everything properly in settings module and with migrations but I cannot access my admin page?

enter image description here

enter image description here

1

1 Answer 1

1

Every django app needs a Site to run, So write in django shell

 $> ./manage.py shell
>>> from django.contrib.sites.models import Site
>>> site = Site()
>>> site.domain = 'example.com'
>>> site.name = 'example.com'
>>> site.save()
Sign up to request clarification or add additional context in comments.

2 Comments

Error : "duplicate key value violates unique constraint"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.