caktus / django-treenav

Extensible, hierarchical, and pluggable navigation system for Django sites
BSD 3-Clause "New" or "Revised" License
130 stars 34 forks source link

48 django1.10 compatibility #49

Closed benred42 closed 9 years ago

benred42 commented 9 years ago

I believe that should take care of #48. Switched to using named urls instead of dotted paths in test_views.py and changed the imports and associated lines away from the to-be deprecated django.contrib.contenttypes.generic in treenav/admin.py and treenav/models.py. Let me know if there's anything I missed.

vkurup commented 9 years ago

templates/treenav/menuitem.html still uses from future import url which will be removed in 1.9: https://docs.djangoproject.com/en/1.8/releases/1.7/#loading-ssi-and-url-template-tags-from-future-library

I'm also getting a warning about cycle:

GLOB sdist-make: /home/vkurup/dev/django-treenav/setup.py
py27-1.7.X inst-nodeps: /home/vkurup/dev/django-treenav/.tox/dist/django-treenav-0.9.2.zip
py27-1.7.X installed: Django==1.7.10,django-mptt==0.7.4,django-treenav==0.9.2,wheel==0.24.0
py27-1.7.X runtests: PYTHONHASHSEED='1950708626'
py27-1.7.X runtests: commands[0] | /home/vkurup/dev/django-treenav/.tox/py27-1.7.X/bin/python runtests.py
Creating test database for alias 'default'...
./home/vkurup/dev/django-treenav/.tox/py27-1.7.X/local/lib/python2.7/site-packages/django/template/base.py:290: RemovedInDjango18Warning: 'The `cycle` template tag is changing to escape its arguments; the non-autoescaping version is deprecated. Load it from the `future` tag library to start using the new behavior.
  compiled_result = compile_func(self, token)

I think that's actually coming from https://github.com/django-mptt/django-mptt/issues/333 and I don't think it's a problem.

benred42 commented 9 years ago

I removed the deprecated tag. I'm getting a few more warnings as well that might bear looking into, so maybe we should keep this open for the moment.

vkurup commented 9 years ago

It's up to you. What you have in this PR looks good, so I'm ok with you merging it and just keeping issue #48 open (perhaps with a comment about the additional warnings that need to be investigated)

benred42 commented 9 years ago

Sounds good to me.