idlesign/django-sitetree — pull request #116 by robcharlwood (2013-11-07 15:07:06+00:00)
Title: Fixed django 1.4.10 issue. Updated the .gitignore file to ignore tox and...

Hello,

When running django 1.4.10 all the urls in a sitetree turn to #unresolved. This is because the ``DJANGO_VERSION_INT`` logic in the ``utils.py`` file is flawed. The code in ``sitetreeapp.py`` that checks the django version to determine how urls should be resolved/parsed checks that the ``DJANGO_VERSION_INT`` var is greater than 150. However, when django 1.4.10 is installed the ``DJANGO_VERSION_INT`` becomes 1410, meaning that 1.4.10 installs are trying to resolve/parse urls in django 1.5+ format.

I have attached a pull request with a fix for this issue using tuples. The comparison of tuples is lexicographical meaning that is it considerably more robust than the current format.

I re-ran the tox test suite and the two that were failing (py27-django14 and py26-django14) are now passing again.

Cheers,
Rob