0

When I migrate my django application then in "Postgres" database "django_site" table is not created. Please help me to solve this problem. Thank you.

3
  • please provide more details about your question. Commented Feb 14, 2017 at 6:13
  • I am migrating my django application. I use postgres database. When I use migrate command django creates some table automatically. It includes django_sessions,django_admin_log etc. django_site table should be created but this table is not created after migrating. Other tables are created properly. Commented Feb 14, 2017 at 6:28
  • by default django doesn't provide it's site framework. so to get django_site table created please refer this link docs.djangoproject.com/en/1.10/ref/contrib/sites Commented Feb 14, 2017 at 6:31

1 Answer 1

1

Enabling the sites framework

To enable the sites framework, follow these steps:

Add 'django.contrib.sites' to your INSTALLED_APPS setting.

Define a SITE_ID setting:

SITE_ID = 1

Run migrate. your sites table will be created now.

source : https://docs.djangoproject.com/en/1.10/ref/contrib/sites/

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

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.