Question

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.

Was it helpful?

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:

  • Wait till a new stable version with the fix comes out.

  • NOT RECOMMENDED: You can install a current development version of Django from the master branch. This would solve your particular problem, but would be absolutely insane and most likely would introduce all kinds of other problems.

  • You can get the 1.6.1 stable version from git, and then try to manually cherry-pick the change from the master branch. It's quite likely this won't work or at least require some additional manual changes, since the change was not originally intended for the 1.6.x branch.

  • If you get the team to backport the change to the 1.6.x branch you can run Django from this branch. I wouldn't do this in production, but it is much safer than running from master. This of course would be a temporary solution, before a new minor 1.6.x version comes out.

  • If you get the team to backport the change to the 1.6.x branch, you can get the 1.6.1 stable version from git, and then manually cherry-pick the change from the 1.6.x branch.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top