Django-CMS warning on django-mptt

自古美人都是妖i 提交于 2019-12-10 19:14:09

问题


I have a Django-CMS 2.4.1 project that always gives me the warning:

DeprecationWarning: Implicit manager CMSPlugin.tree will be removed in django-mptt 0.6.  Explicitly define a TreeManager() on your model to remove this warning.

This only occurs in production - not in dev.

I tried:

./manage.py cms fix-mptt

which gives me the output (after the same warning as above):

fixing mptt page tree
fixing mptt plugin tree
all done

But... this does not solve the problem, e.g. if I repeat the command it does the same thing again, with the same warning.

The warning doesn't seem to be doing any harm yet, but I imagine it will with the next version of django-mptt. Can anyone give me any advice?

thanks


回答1:


You can safely ignore that warning in any case.

It's just telling you that django CMS's use of Django MPTT is relying on something that will be removed in a future version.




回答2:


Harmless but utterly annoying, make the b*tch shut up:

CMSPlugin.tree = CMSPlugin.objects

in any module of early execution (models.py for example).



来源:https://stackoverflow.com/questions/16682693/django-cms-warning-on-django-mptt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!