SeattleTestbed / custominstallerbuilder

Django app to customize SeattleTestbed installers with public keys
MIT License
0 stars 7 forks source link

Django 1.4 and later break the XML-RPC interface #5

Closed aaaaalbert closed 9 years ago

aaaaalbert commented 9 years ago

@yyzhuang reports (and @asm582 confirms) that the combination of updated Clearinghouse and updated Custominstallerbuilder does not work together correctly. "Updated" in this context refers to the changes made to support Django 1.6.x and mod_wsgi as a replacement for mod_python.

Although the CIB website works fine and builds working installers, the XML-RPC interface (that the CH uses to request "crediting" installers for a CH user account) is broken. From the CIB Apache error log:

[Mon Mar 30 07:44:13 2015] [error] Error while generating https://sensibilityclearinghouse.poly.edu/custominstallerbuilder/xmlrpc/
[Mon Mar 30 07:44:13 2015] [error]   Traceback (most recent call last):
[Mon Mar 30 07:44:13 2015] [error]     File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 112, in get_response
[Mon Mar 30 07:44:13 2015] [error]     File "/home/custominstallerbuilder/custominstallerbuilder/xmlrpc/views.py", line 59, in xmlrpc_handler
[Mon Mar 30 07:44:13 2015] [error]   AttributeError: 'WSGIRequest' object has no attribute 'raw_post_data'

I'm working to fix this.

aaaaalbert commented 9 years ago

OK, googling the correct part of the error message yields the solution almost instantly: Django 1.4 deprecated the property name raw_post_data of a request, and renamed it to query instead.

aaaaalbert commented 9 years ago

Fixed in private branch aaaaalbert@04239c99122bc29973025ba0a347e5c3fcc5f020, will be merge to master from there. Closing!