[Django] #26453: SITE_ID should start from 1, not 0

3 views
Skip to first unread message

Django

unread,
Apr 3, 2016, 10:38:18 AM4/3/16
to django-...@googlegroups.com
#26453: SITE_ID should start from 1, not 0
-------------------------------+----------------------------
Reporter: ynikitenko | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Keywords: SITE_ID, sites
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+----------------------------
I had a problem with migrations when I set SITE_ID to 0.
In the [https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-
SITE_ID documentation] I read that it should be integer, so I thought 0
would be fine.
I had the following error:
ValueError: The database backend does not accept 0 as a value for
AutoField.
I suggest writing in the documentation that it should start from 1. The
same problem is in the documentation for django 1.9.

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

Django

unread,
Apr 4, 2016, 8:25:18 AM4/4/16
to django-...@googlegroups.com
#26453: SITE_ID should start from 1, not 0
-------------------------------------+-------------------------------------
Reporter: ynikitenko | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: wontfix

Keywords: SITE_ID, sites | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => wontfix
* needs_tests: => 0
* easy: 0 => 1
* needs_better_patch: => 0
* needs_docs: => 0
* type: Bug => Cleanup/optimization


Comment:

Thanks for the suggestion. This restriction only applies to MySQL,
however, and I don't think it's a big enough pitfall to warrant a note in
the docs.

--
Ticket URL: <https://code.djangoproject.com/ticket/26453#comment:1>

Reply all
Reply to author
Forward
0 new messages