-------------------------------------------------------------------------------------------------
from google.appengine.dist import use_library
use_library('django', '1.0')
import logging, os
# Google App Engine imports.
from google.appengine.ext.webapp import util

# Force Django to reload its settings.
from django.conf import settings
settings._target = None

# Must set this env var *before* importing any part of Django
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

import django.core.handlers.wsgi
import django.core.signals
import django.db
import django.dispatch.dispatcher

def log_exception(*args, **kwds):
    logging.exception('Exception in request:')

    # Log errors.
    django.dispatch.dispatcher.connect(
       log_exception, django.core.signals.got_request_exception)

    # Unregister the rollback event handler.
    django.dispatch.dispatcher.disconnect(
        django.db._rollback_on_exception,
        django.core.signals.got_request_exception)

def main():
    # Re-add Django 1.0 archive to the path, if needed.
#    if django_path not in sys.path:
#        sys.path.insert(0, django_path)

    # Create a Django application for WSGI.
    application = django.core.handlers.wsgi.WSGIHandler()

    # Run the WSGI CGI handler with that application.
    util.run_wsgi_app(application)

if __name__ == '__main__':
    main()
-------------------------------------------------------------------------------------------------

On Jun 19, 7:05 pm, Ubaldo Huerta <uba...@gmail.com> wrote:
> Regarding django support.
>
> Is it 1.02 support or just 1.0 support?
>
> I'm currently using zip import (which slows things down significantly
> when app instance is cold). The release notes says that django needs
> to be installed. But where? Is 0.96 removed?
>
> On Jun 19, 11:51 am, Paul Kinlan <paul.kin...@gmail.com> wrote:
>
> > Barry,
> > I believe your treat each task as a webrequest and at the moment there is a
> > 10K limit 
> > (http://code.google.com/appengine/docs/python/taskqueue/overview.html) on 
> > the
> > size of task items.  I believe the best course of action is to stash them in
> > memcache (although I am sure you may get instances where it might be removed
> > from memcache) - from what I understand enqueing on
> > to the task queue is a lot faster than storing a temp object in the
> > data store, depending
> > on the reason for you using the
> > queue, persisting the object to the datastore might negate some of its
> > usefulness.
>
> > I think some experimentation is needed.
>
> > Paul
>
> > 2009/6/19 Barry Hunter <barrybhun...@googlemail.com>
>
> > > Excellent!
>
> > > Is there any limits on the 'params' structure in the task queue?
>
> > > Can we (should we!?!) pass around really big data via this, or would
> > > it be best stored in memcache (for example) and just the key passed?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to