The endpoint_loader dynamically imports modules based on the URL:
try:
module = import_module('%s.endpoints' % application)
except ImportError, e:
raise AJAXError(404, _('AJAX endpoint does not exist.'))
The trouble with this is that programming errors (syntax errors and such like that would prevent the endpoints module from being imported) are disguised as client errors, making debugging unnecessarily complicated. Perhaps, when DEBUG is set, simply raise the ImportError.
The endpoint_loader dynamically imports modules based on the URL:
The trouble with this is that programming errors (syntax errors and such like that would prevent the endpoints module from being imported) are disguised as client errors, making debugging unnecessarily complicated. Perhaps, when DEBUG is set, simply raise the ImportError.