jorgebastida/django-dajaxice — pull request #53 by Ghopper21 (2012-06-28 00:54:29+00:00)
Title: Added setting to allow response methods to be any module, not just ajax.py

Added a setting DAJAXICE_IMPLICIT_MODULE_NAME which lets you choose what (if any) implicit Python module name will be added to calls to response methods via Dajaxice. Specifically, if DAJAX_IMPLICIT_MODULE_NAME is implicit_module, a Javascript call to Dajaxice.app_name.method_name will cause Dajaxince to send the request to app_name.implicit_module.method_name

In other words, with this setting you can put response methods in any module, not just in ajax.py.

By default, this setting is "ajax" -- which leaves the existing functionality unchanged, i.e. response methods go in ajax.py files within app packages. Note this setting can be a blank string, which allows the Javascript Dajaxice call to mirror the Python package/module/method path more closely.

Also note that you should still always register Dajaxice response methods in a Django app's ajax.py module (even if the response methods themselves are not in that module). This is because Dajaxice's autodiscover mechanism will always look the ajax.py moduleregardless of this setting.