djangoinstallationpipdjango-contrib

Django 1.6 - admindocs and SITE_ID generates error in views section


Django 1.6 disabled the formerly automatically enabled sitesframework. This introduced a bug in the views section of admin docs.

The maintainers have already fixed and closed it https://code.djangoproject.com/ticket/21386

I have a fresh pip install of 1.6, but the error is still present. My guess is that the fix is currently not built into the latest stable available over PIP?

My question is: What way would you suggest to get that fix into my running setup? (If possible I'd like to leave it on PIP instead of checking out django directly from Github)

Solution from the maintainers

If someone stumbles upon this issue see bouke's reply on the official ticket: https://code.djangoproject.com/ticket/21386#comment:8

Setting SITE_ID=None in your settings.py solves the error.


Solution

  • This was fixed in the master branch, which is the place where development toward the new major 1.7 release happens. This means the problem will be fixed in 1.7, but the version is not out yet, and won't be for the next couple of months.

    You may try asking the Django team (politely!) to backport the change to the stable/1.6.x branch, since its not a new future, but just a fix for a problem in 1.6. Changes in this branch will be included in the minor 1.6.2 release, when it comes out.

    My question is: What way would you suggest to get that fix into my running setup? (If possible I'd like to leave it on PIP instead of checking out django directly from Github)

    You will not find a version with the fix in the Python Package Index (used by pip), as long as a stable release which includes the change doesn't come out.

    Here are some options: