Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding the site_id of a Site in Django Admin

Tags:

django

I'm installing Django AllAuth into my project and have come across the following line in the documentation for that app (see docs here):

Add a Site for your domain, matching settings.SITE_ID (django.contrib.sites app).

My settings.SITE_ID is 1, unsurprisingly. How do I 'match' this in the Django Admin? I only have 2 fields - Domain Name and Display name.

Conversely, if I create a site in the admin, how do I know what the site_id for it is?

like image 670
Pete Drennan Avatar asked Jan 13 '14 05:01

Pete Drennan


1 Answers

You can find the site_id in the address bar.

screenshot of web browser showing Django administration and url of interest

So the line in settings.py would be: SITE_ID = 3

like image 59
Andrea de Marco Avatar answered Oct 14 '22 11:10

Andrea de Marco