#23945: Use configured SITE_ID when creating the default site
-------------------------------+--------------------
     Reporter:  wrwrwr         |      Owner:  nobody
         Type:  New feature    |     Status:  new
    Component:  contrib.sites  |    Version:  master
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  1
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 Consider the following steps:
 * start a new project;
 * edit settings adding `SITE_ID = 26` and `'django.contrib.sites'`;
 * migrate.

 The default "example.com" site will be created with the primary key equal
 to 1 not 26.

 Fixing it in general doesn't seem to cause any harm, but it probably only
 matters with some nonrel backends. For instance, in MongoDB automatic
 primary keys are [http://docs.mongodb.org/manual/reference/object-id/
 certain bytestings] ^[#f1 1]^ and mongo backend [https://github.com
 /django-nonrel/mongodb-
 engine/blob/master/django_mongodb_engine/base.py#L99 doesn't support]
 anything else as keys.

 ''![1][[=#f1]] Supporting such keys requires some black magic, but that's
 another story.''

--
Ticket URL: <https://code.djangoproject.com/ticket/23945>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.e151ff60cf151ec09c82d967e317ba7c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to