Upload Django local version to AppEngine file system

8 views
Skip to first unread message

Sharp-Developer.Net

unread,
Jun 26, 2008, 8:35:29 PM6/26/08
to Google App Engine
I've creted a "small" version of Django 0.97 as a local subfolder in
my project

So I have dir structure like this:

src
+-django
+-mycode
-app.yaml
-index.yaml
-main.py

And this workign fine with Dev_AppServer (I checked this local version
is used).

The problem is that files from "django" folder are not uploading to
AppEngine. Whyle "mycode" folder is uploading fine.

On app engine I'm getting next error:
Exception Type: TemplateSyntaxError
Exception Value: Invalid block tag: 'with'
Exception Location: /base/python_lib/versions/1/django/template/
__init__.py in invalid_block_tag

Any ideas why and how to solve this problem?

I've imagaine that "django" is filtered and tryed to rename "django"
fodler to something like "django097" - but could not manage it works
localy.

Will apreciate any directions to solve this. My app is down at the
moment becouse of this :(.
--
Alexander Trakhimenok
http://sharp-developer.net/

Mattias Johansson

unread,
Jun 27, 2008, 6:07:00 AM6/27/08
to Google App Engine
hmm. I have 0.97 in a "django" subfolder, and it's working fine to
upload to app engine. Are you using the Django Helper?

/Mattias

On 27 Juni, 02:35, "Sharp-Developer.Net"

Sharp-Developer.Net

unread,
Jun 27, 2008, 10:18:55 AM6/27/08
to Google App Engine
In last 2 weeks I tryed so much so a bit lost.

I think I did used the Django helper. Not sure at the moment. How to
check that?

Sorry for dumb questions - late nights do makes me stupid...

Here is my main.py:
============================================
import logging
import os,sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'myapp.settings'
#sys.path.append('c:/tmp/mashname')

# 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

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

# 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():
logging.getLogger().setLevel(logging.DEBUG)

# 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()
============================================
--
Alex

On Jun 27, 11:07 am, Mattias Johansson <mattias.johans...@gmail.com>
wrote:

Sharp-Developer.Net

unread,
Jun 27, 2008, 2:22:26 PM6/27/08
to Google App Engine
Thanks for pointing me to Django helper. Looks I was using it partialy
and partialy refered directly to Django and partialy... etc.

After getting main from helper and cleaning up settting.py and other
stuff everything works fine at the moment.

Thanks again.
--
Alexander Trakhimenok
http://sharp-developer.net/

On Jun 27, 3:18 pm, "Sharp-Developer.Net"
Reply all
Reply to author
Forward
0 new messages