Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to setup sites framework in django

I am trying to setup multiple sites from a single project in django. I was trying to set this up following https://docs.djangoproject.com/en/1.8/ref/contrib/sites/ but there is no mention of setup only how to use the sites framework once implemented.

I have implmented sites before and I added sites to my installed apps like this:

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',

)

I tried to issue the command: python manage.py makemigrations but it says:

No Changes detected

I'm using django 1.8 , does the sites framework setup still create a table called django_site ?

How do I do the initial setup to have this table created?

like image 575
Atma Avatar asked Oct 24 '25 15:10

Atma


1 Answers

I guess I needed to just migrate instead of make migrate like this:

python manage.py migrate
like image 136
Atma Avatar answered Oct 26 '25 06:10

Atma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!