#24488 closed Bug (fixed)
Optional SITE_ID when migrating django.contrib.sites
Reported by: | Claudemiro | Owned by: | Marten Kenbeek |
---|---|---|---|
Component: | contrib.sites | Version: | 1.8beta2 |
Severity: | Release blocker | Keywords: | sites, SITE_ID, database |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation says:
"get_current_site() will now lookup the current site based on request.get_host() if the SITE_ID setting is not defined."
https://docs.djangoproject.com/en/dev/releases/1.8/#django-contrib-sites
When I try to migrate the project without the SITE_ID parameter, then I got this error:
AttributeError: 'Settings' object has no attribute 'SITE_ID'
I know about the ticket https://code.djangoproject.com/ticket/23945
I think a better approach is to use the SITE_ID for the migration only if the SITE_ID is configured in settings file, otherwise it must be auto incremented as it were before.
Change History (5)
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Severity: | Normal → Release blocker |
---|---|
Triage Stage: | Accepted → Ready for checkin |
PR: https://github.com/django/django/pull/4327