Opps that should have read "uses the DAL from the commandline"
On 28 Okt., 12:23, voltron <[EMAIL PROTECTED]> wrote:
> Is there anybody that has coded a script that access a web2py
> application and uses the form from the commandline? I just cant get it
> right without hacking or trial and error,and it feels as if the code
> would break in some places:
>
> 1. To get to the models folder I had to make it a python package.
> 2. Import confusion on my part
>
> This is what my imports look like now:
>
> import os
> import sys
>
> #dir='Pokito/website/web2py/PokitoClub'
> dir='/projects/dev_pokitoclub/'
>
> # Append the web2y path
> if os.path.isdir(dir):
> sys.path.append(dir)
>
> from gluon.sql import *
> from gluon.globals import Request as request
> from gluon import *
> from applications.test.models.db_test import *
>
> WARNING:root:no cx_Oracle driver
> WARNING:root:no MSSQL driver
> WARNING:root:no kinterbasdb driver
> Traceback (most recent call last):
>
> db.define_table('users',
> NameError: name 'db' is not defined
> [EMAIL PROTECTED]:/#
>
> An so on and so forth. I would be gratfeul for any suggestiins on how
> to do this in a clean web2py way
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---