开发者

Django docutils not working

开发者 https://www.devze.com 2023-03-28 11:45 出处:网络
I\'m trying to enable docutils for django on windows 7. I\'ve enabled the links in urls.y and settings.py and downloaded and installed the latest snapshot of docutils. However every time I try to acce

I'm trying to enable docutils for django on windows 7. I've enabled the links in urls.y and settings.py and downloaded and installed the latest snapshot of docutils. However every time I try to access the documentation link in the admin I get a page asking me to install docutils.

Any ideas?

T开发者_运维技巧hanks


I guess django tries to do

import docutils

And this fails. Django catches the exception and displayes this message to you.

Please try to get the real exception. You could insert the above line in one of your views:

def myview(request, ...):
    import docutils

I hope django shows you the ImportError. Post it here, if still can't fix it.


Did you restart the Django server? Django has to restart to recognize the newly installed admindocs.


any chance you missed importing the admin in the urls.py?

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()


You might have installed the docutils module in the virtual env/path.

Uninstall it from the virtual path and re-install it in the global python installation folder. That should solve the problem.

Note: Do not install django-docutils, but just simply docutils

0

精彩评论

暂无评论...
验证码 换一张
取 消