Django Tastypie with Apache LXML and DefusedXML: Error: "Using xml aspects requires lxml and defusedxml"

I have a Django app with the RESTFull service provided by Tastypie. I used easy_install to install lxml and defusedxml so that I can use xml instead of json. If I run run.py runningerver, it all works, but if I run it through apache and mod_wsgi on the same computer, I get an error message with the wrong configuration from Django saying

Usage of the xml aspects requires lxml and defusedxml 

I suppose this should be the way, but I cannot find anything to point me in the right direction. Any ideas?

+4
source share
1 answer

OK, so I found the answer to my not-so-well-worded question. When I started easy_install, he never told me that lmxl really could not be installed, because I lacked the compiler. I have no idea why it worked with the Django development server and not through Apache, but I found and installed the lxml binary distribution, and it all started working as it should.

+4
source

Source: https://habr.com/ru/post/1497803/


All Articles