class models.Site
A model for storing the domain
and name
attributes of a website.
-
domain
-
The fully qualified domain name associated with the website. For example,
www.example.com
.Changed in Django 1.9:The
domain
field was set to beunique
.
-
name
-
A human-readable “verbose” name for the website.
The SITE_ID
setting specifies the database ID of the Site
object associated with that particular settings file. If the setting is omitted, the get_current_site()
function will try to get the current site by comparing the domain
with the host name from the request.get_host()
method.
How you use this is up to you, but Django uses it in a couple of ways automatically via simple conventions.
Please login to continue.