Thursday, January 3, 2013

Re: Using django's oodb alone

On 03/01/2013 02:30 μμ, Xavier Pegenaute wrote:
> Hi,
>
> I would like to use the django's oodb in some (ncurses + python)
> scripts. Any one have some experience on it?, do I need to use the
> django scripting environment or may be I can avoid it?
>
>
> Thanks,
> Xavi
>

Of course you can do it, you just have to import some things in order to
load the django

I have created a number of scripts like that and have something like
this in the begining of the file


#! /usr/bin/env python
# -*- coding: utf-8
import sys
import os
sys.path.append('./django/')
os.environ['DJANGO_SETTINGS_MODULE'] ='settings'

from myapp.models import User, Reminder, ExtraUserAttributes


etc
--

--------------------------------------------------------------
Nick Apostolakis
e-mail: nickapos@oncrete.gr
Web Site: http://nick.oncrete.gr
--------------------------------------------------------------


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

No comments:

Post a Comment