You can directly use Django’s manage.py commands. For example, run
manage.py createsuperuser to create a new admin user and
manage.py runserver to start the development server.
Important: Don’t use dev_appserver.py directly. This won’t work as expected because
manage.py runserver uses a customized dev_appserver.py configuration. Also, never run
manage.py runserver together with other management commands at the same time. The changes won’t take effect. That’s an App Engine SDK limitation which might get fixed in a later release.
With djangoappengine you get a few extra manage.py commands:
manage.py remoteallows you to execute a command on the production database (e.g.,
manage.py remote shellor
manage.py remote createsuperuser)
manage.py deployuploads your project to App Engine (use this instead of
Note that you can only use
manage.py remote if your app is deployed and if you have enabled authentication via the Google Accounts API in your app settings in the App Engine Dashboard. Also, if you use a custom app.yaml you have to make sure that it contains the remote_api handler. Running ‘remote’ executes your local code, but proxies your datastore access against the remote datastore.
App Engine for Business¶
In order to use
manage.py remote with the
googleplex.com domain you need to add the following to the top of your
from djangoappengine.settings_base import * DATABASES['default']['DOMAIN'] = 'googleplex.com'
Checking whether you’re on the production server¶
from djangoappengine.utils import on_production_server, have_appserver
When you’re running on the production server
True. When you’re running either the development or production server
True and for any other
manage.py command it’s
Important: Your instances will load slower when using zip packages because zipped Python files are not precompiled. Also, i18n doesn’t work with zip packages. Zipping should only be a last resort! If you hit the 3000 files limit you should better try to reduce the number of files by, e.g., deleting unused packages from Django’s “contrib” folder. Only when nothing (!) else works you should consider zip packages.
Since you can’t upload more than 10000 files on App Engine you sometimes have to create zipped packages. Luckily, djangoappengine can help you with integrating those zip packages. Simply create a “zip-packages” directory in your project folder and move your zip packages there. They’ll automatically get added to