import os

os.environ['PYTHONPATH'] = '/path/to/myproject'
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'

and than

from myproject.models import MyModel


Hope that helps.

On 17 set, 13:03, John D Giotta <[email protected]> wrote:
> I'm using django as a configuration GUI, but the script I'm using to
> process data on regular intervals is a non-django script.
>
> How can I import django models I've create to leverage the api
> features in my non-django script?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to