[web2py] import csv automatic

2010-11-16 Thread Aurigadl
hello how I can automatically load a database from a csv. The idea is that when my application starts for the first time, load the database as countries, states, etc. without having to do it by hand. I tried loading it through the next line. db.country.import_from_csv_file(open('.../static/cont

[web2py] Re: import csv automatic

2010-11-17 Thread Aurigadl
#This was my solution. import os db.define_table('sgd_pa_cont_continente', Field('cont_nombre',writable=False, required=True, notnull=True)) appfolder = os.path.normpath(request.folder) fileCsv = os.path.join(appfolder, 'static','continente.csv') db.import_from_csv_file(open(fileCsv, 'rb'

[web2py] import modules from plugin

2010-11-22 Thread Aurigadl
as I can import a model from plugin Example: myAplication =>models =>controller =>views . . . . =>plugins_xxx => models => plugin_xxx.py =>modules => libs1py => libs2.py In the file models/plugin_xxx.py I write this:

[web2py] Re: import modules from plugin

2010-11-22 Thread Aurigadl
in_xxx/libs1.py) > > and if there is a function f in the module > >   r=libs1.f(...) > > On Nov 22, 5:09 am,Aurigadl wrote: >

[web2py] mongoDb

2010-11-25 Thread Aurigadl
In my projects I'm using MongoDB I need to work with this tool you need this to work with web2py? Make controller for this RDBMS or or this tool work wiht this

[web2py] Re: mongoDb

2010-11-25 Thread Aurigadl
if imported from a module as such it dont use the native libraries (DAL, SQLFORM, etc ) and framework would be disadvantage. which is the best way to work with MongoDB?? Thanks for the answer

[web2py] modules

2012-05-16 Thread Aurigadl
I always work with modules. In the latest versions of web2py not work. doing the following to import: from applications.examples.modules import test Restricting the application name.The modules are placed in the / app / modules/. As this problem solved.

[web2py] Re: modules

2012-05-16 Thread Aurigadl
, 16 de mayo de 2012 10:32:00 UTC-5, Anthony escribió: > > Are you importing from within the "examples" application? In that case you > can just do: > > import test > > Anthony > > On Wednesday, May 16, 2012 11:13:16 AM UTC-4, Aurigadl wrote: >> >>

[web2py] Re: modules

2012-05-16 Thread Aurigadl
and os version. > > On Wednesday, 16 May 2012 10:40:54 UTC-5, Aurigadl wrote: >> >> if you have: >> >> /applications/examples/modules/prueba.py >> >> $python web2py.py -S examples >> >> >>import prueba >> >> this does not work

[web2py] Re: modules

2012-05-17 Thread Aurigadl
i don't find the error in this code... El miércoles, 16 de mayo de 2012 10:57:15 UTC-5, Aurigadl escribió: > > I did > Thank you for entering Issue > 800<http://code.google.com/p/web2py/issues/detail?id=800> > > > > El miércoles, 16 de mayo de 2012 10:43:36 U

[web2py] Re: modules

2012-05-17 Thread Aurigadl
the problem was caused because the file is not created __ init__ in the first folder of the project. / myapp / __init__.py why not this file is always created automatically? .. El jueves, 17 de mayo de 2012 12:14:21 UTC-5, Aurigadl escribió: > > i don't find the error in this cod