OSXMountainLionのpython2.7を使用してvirtualenvでDjango1.3を実行しています。dev_appserver.pyを実行すると、これがスローされます。(に関する警告は無視してimages API
ください。
質問:mysqldb
使用しているときに警告が表示されるのはなぜndb
ですか?
質問:警告について何かする必要がありますか?
Python、Django、AppEngineを使用するのはこれが初めてなので、セットアッププロセスで何か問題が発生しているかどうかはわかりません。私はデータベースで何もしていません(例syncdb
)
WARNING 2012-12-29 21:05:26,272 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
INFO 2012-12-29 21:05:26,356 appcfg.py:586] Checking for updates to the SDK.
INFO 2012-12-29 21:05:26,795 appcfg.py:604] The SDK is up to date.
WARNING 2012-12-29 21:05:26,795 dev_appserver.py:3571] The datastore file stub is deprecated, and
will stop being the default in a future release.
Append the --use_sqlite flag to use the new SQLite stub.
You can port your existing data using the --port_sqlite_data flag or
purge your previous test data with --clear_datastore.
WARNING 2012-12-29 21:05:26,795 datastore_file_stub.py:518] Could not read datastore data from /var/folders/92/tl1hq8ps1v18n1m68s6fxkp00000gn/T/dev_appserver.datastore
WARNING 2012-12-29 21:05:26,797 dev_appserver.py:3670] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
INFO 2012-12-29 21:05:26,802 dev_appserver_multiprocess.py:655] Running application dev~google-solveforx on port 8080: http://localhost:8080
INFO 2012-12-29 21:05:26,802 dev_appserver_multiprocess.py:657] Admin console is available at: http://localhost:8080/_ah/admin
app.yaml
application: appname
version: staging
runtime: python27
api_version: 1
threadsafe: false
main.py
import os
from django.core.handlers import wsgi
from google.appengine.ext import ndb
os.environ['DJANGO_SETTINGS_MODULE'] = 'appname.settings'
# Wrapping the WSGI application in ndb.toplevel ensures that all async
# operations complete before returning.
application = ndb.toplevel(wsgi.WSGIHandler())
settings.py
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
ROOT_URLCONF = 'solveforx.urls'
MIDDLEWARE_BASE = 'solveforx.lib.middleware'
MIDDLEWARE_CLASSES = (
'django.middleware.csrf.CsrfViewMiddleware',
'%s.SecurityMiddleware' % MIDDLEWARE_BASE,
'%s.TemplateContext' % MIDDLEWARE_BASE,
)
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.csrf',
'django.core.context_processors.request',
)
# By default django will load the templates under templates/ directory under
# every installed apps.
INSTALLED_APPS = (
'appname.frontend',
)