sebastian-ardila / google-app-engine-django

Automatically exported from code.google.com/p/google-app-engine-django
Apache License 2.0
0 stars 0 forks source link

appcfg.py upload_data Loaders don't work with django helper #157

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a simple bulkloader.Loader implementation
2. Run appcfg.py upload_data using your loader file
3. Observe the trace below

What is the expected output? What do you see instead?

You need to import your models for use by the bulkloader, but importing 
your models ends up importing the django stack which becomes upset 
that:

EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is 
undefined.

What version of the product are you using? On what operating system?

Mac OS X 10.6.2
Django 1.1.1
django helper r100

Please provide any additional information below.

Original issue reported on code.google.com by holom...@gmail.com on 24 Jan 2010 at 1:25

GoogleCodeExporter commented 9 years ago
Before you import your model be sure to include these lines to bootstrap the 
helper:

from appengine_django import InstallAppengineHelperForDjango
InstallAppengineHelperForDjango()

I also have to set my PYTHONPATH appropriately, but this may not be necessary 
for
your environment.

If I do these two things then I am able to upload data.

Original comment by dherbst on 15 Feb 2010 at 4:02

GoogleCodeExporter commented 9 years ago

Original comment by m...@google.com on 8 Jun 2010 at 11:53