It took some effort to deploy the debris network to SAE, which encountered various problems. It feels like the SAE looks beautiful, but it's actually not too mature (at least in Python).
Here are some of the major issues and workarounds that I have encountered.
Django Version Issues
Django1.4 is about to be released, and the SAE version of the SAE platform is still 1.2x. To use the django1.3 version, you need to upload your own Django. Refer to the runtime.html#virtualenv in the SAE manual for details
Error in log module
The first thing to encounter is the day to module problem. The error shows that a class was constructed in Adminemailhandler with the Is_mail parameter, but the target class's constructor is not supported at all. Fortunately, the module is not required. Replace the day-to-process module with Django.utils.log.NullHandler to solve the problem.
Local_thread problems
Join in the Index.wsgi
Settings file
The SAE has a number of Python packages installed by default, including Django-userena. The bad thing is that the SAE has added the Django-userena demo project to the Python path, and the load priority is higher than the project code. The direct result of os.environ[' django_settings_module ' = ' SETTINGS ' found is the SETTINGS file of Userena. Finally, rename the settings file to qnotes_settings.py to resolve the issue.
Other questions
Database errors often occur after deployment was launched yesterday, with the error caught operationalerror while rendering: (1045, ' access deny '). The SAE database does not support long connections and proactively expires after 30s. But Django will automatically shut down the database connection after each request, and in theory should not have a similar problem. The problem today inexplicably self-good.
The server is very unstable, often inaccessible for long periods of time, and can be accessed normally at irregular intervals.
The SAE may have hack the Python package loading mechanism, and the loading behavior of the SAE Python package is somewhat odd. The package in the current directory should be loaded first, but not necessarily.