Re: [web2py] Re: it case you missed it...

2010-12-10 Thread Tom Atkins
The new DAL looks fantastic Massimo.

So that people don't get the wrong impression though: It's a bit
disconcerting to click the initial link in the Reddit article about 'brand
new DAL' and then get a very large title saying 'Old web2py blog' and
response flash saying 'Some info may be out of date' especially as there
is no 'published' or 'modified' date for the page content there.

The AlterEgo site definitely needs 'last modified' dates on articles.

Hopefully this is constructive criticism ;-)


Re: [web2py] Re: it case you missed it...

2010-12-10 Thread Bruno Rocha
 The new DAL looks fantastic Massimo.

 So that people don't get the wrong impression though: It's a bit
 disconcerting to click the initial link in the Reddit article about 'brand
 new DAL' and then get a very large title saying 'Old web2py blog' and
 response flash saying 'Some info may be out of date' especially as there
 is no 'published' or 'modified' date for the page content there.

 The AlterEgo site definitely needs 'last modified' dates on articles.

 Hopefully this is constructive criticism ;-)


I totally agree, I think that the alter ego should wear the same layout as
web2py main site (examples app)


[web2py] Help with Database

2010-12-10 Thread CesarBustios
Hi, i wanto to know if there is a way to change from Postgres to MySQL
and keep all the information in the db. How can i do that?

Thanks a lot!

Cesar B.


Re: [web2py] Help with Database

2010-12-10 Thread Kenneth Lundström
One way of doing this is to export all data while connected to Postgres 
and then import to MySQL. And doing the import and export via web2py.



Kenneth


Hi, i wanto to know if there is a way to change from Postgres to MySQL
and keep all the information in the db. How can i do that?

Thanks a lot!

Cesar B.




[web2py] Re: Help with Database

2010-12-10 Thread CesarBustios
Thaks Kenneth, do you know where can i find some examples or
documentation about this?

On Dec 10, 4:16 am, Kenneth Lundström kenneth.t.lundst...@gmail.com
wrote:
 One way of doing this is to export all data while connected to Postgres
 and then import to MySQL. And doing the import and export via web2py.

 Kenneth







  Hi, i wanto to know if there is a way to change from Postgres to MySQL
  and keep all the information in the db. How can i do that?

  Thanks a lot!

  Cesar B.


Re: [web2py] Re: Help with Database

2010-12-10 Thread Kenneth Lundström

http://web2py.com/book/default/chapter/06?search=csv#Exporting-and-Importing-Data


Kenneth


Thaks Kenneth, do you know where can i find some examples or
documentation about this?

On Dec 10, 4:16 am, Kenneth Lundströmkenneth.t.lundst...@gmail.com
wrote:

One way of doing this is to export all data while connected to Postgres
and then import to MySQL. And doing the import and export via web2py.

Kenneth








Hi, i wanto to know if there is a way to change from Postgres to MySQL
and keep all the information in the db. How can i do that?
Thanks a lot!
Cesar B.




[web2py] Re: Help with Database

2010-12-10 Thread CesarBustios
Thanks! :)

On Dec 10, 4:36 am, Kenneth Lundström kenneth.t.lundst...@gmail.com
wrote:
 http://web2py.com/book/default/chapter/06?search=csv#Exporting-and-Im...

 Kenneth







  Thaks Kenneth, do you know where can i find some examples or
  documentation about this?

  On Dec 10, 4:16 am, Kenneth Lundstr mkenneth.t.lundst...@gmail.com
  wrote:
  One way of doing this is to export all data while connected to Postgres
  and then import to MySQL. And doing the import and export via web2py.

  Kenneth

  Hi, i wanto to know if there is a way to change from Postgres to MySQL
  and keep all the information in the db. How can i do that?
  Thanks a lot!
  Cesar B.


[web2py] Re: how to use GAE deferred

2010-12-10 Thread Richard
thanks - just what I wanted

[web2py] in link i will post a string

2010-12-10 Thread pk
Hi together,

i think it is a very small problem.
i need a stringvariable that i post to the function user in my default
controller when the user is clicking this link:

string = 'Anmelden'

li class=page_itema class=loginframe href={{=URL(r=request,
c='default', f='user')}}Anmelden/a/li

how can i do this?

and how can i catch the string in the controller like this?

def user():
mystring = request...

thanks for your help

peter



Re: [web2py] Re: it case you missed it...

2010-12-10 Thread Albert Abril
Agree too, 'old web2py blog' and the 'flash' informing that the info could
be oudated...
..If we're linking to the new DAL, recently wrote. :D

Hopefully this is constructive criticism too ;)

On Fri, Dec 10, 2010 at 9:24 AM, Bruno Rocha rochacbr...@gmail.com wrote:

 ego should wear the same layout as web2py main site (examples app)


[web2py] Re: in link i will post a string

2010-12-10 Thread pk
my js:
var button = Anmelden;
console.log(button);
$.ajax({ url: {{=URL(r=request,c='default',f='user')}},
button: button });

my default-controller:
return(request.vars.button)

but why is the return value: none ??

thanks


[web2py] jquery UI Widgets: wijmo

2010-12-10 Thread Massimiliano
Looks interesting

http://wijmo.com/

-- 
Massimiliano


[web2py] how to do content negotiation with web2py

2010-12-10 Thread selecta
how to do content negotiation with web2py? something like

def myfkt():
   if reques.header ??? xml:
  redirect(URL(r=request, f=myfkt.xml, vars=request.vars,
args=request.args))


[web2py] Re: needs more new dal testers

2010-12-10 Thread mdipierro


On Dec 9, 11:49 pm, Michael McGinnis ish...@biographiks.com wrote:
 I could run 1.89.5 (2010-11-21 22:12:54)
 with ./jython web2py/web2py.py (no cron because no file locking,
 though) just fine onhttp://127.0.0.1:8000/admin/default/site
 though I got errors on several other apps 
 includinghttp://127.0.0.1:8000/welcome/default/index:
 type 'exceptions.RuntimeError'(global name 'sqlite3' is not defined
 (tried 5 times))

this just means you do not have sqlite with jdbc.


 For what it's worth, this is what I get when I try to run the old dal
 as a standalone file:
 mich...@doulos:~/jython2.5.2rc2$ ./jython dal.py
 Traceback (most recent call last):
   File dal.py, line 51, in module
     from utils import md5_hash, web2py_uuid
 ImportError: No module named utils

hmm. that line is not in line 51.


 On Dec 9, 11:25 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  I think the problem is that it not finding any driver. It is not even
  defining db.
  Did the old dal worked with jython.

  good pypy works for you. It crashes with segmentation fault on me.

  On Dec 9, 11:17 pm, Michael McGinnis ish...@biographiks.com wrote:

   I've never used either one before. But no errors on pypy-1.4.
   For jython-2.5.2rc2, here is a typical message, apparently one of 77:
   **
   File dal.py, line 4874, in __main__.test_all
   Failed example:
       db.paper.drop()
   Exception raised:
       Traceback (most recent call last):
         File /home/michael/jython2.5.2rc2/Lib/doctest.py, line 1235,
   in _DocTestRunner__run
           exec compile(example.source, filename, single,
         File doctest __main__.test_all[63], line 1, in module
           db.paper.drop()
       NameError: name 'db' is not defined
   **
   2 items had failures:
     15 of  15 in __main__
     62 of  64 in __main__.test_all
   ***Test Failed*** 77 failures.

   On Dec 8, 9:28 pm, mdipierro mdipie...@cs.depaul.edu wrote:

Can you try jython and pypy and do

jython dal.py
pypy dal.py

Please report any error.

Massimo




[web2py] Re: Trying to test DAL vs. CouchDB but still getting errors ...

2010-12-10 Thread mdipierro
I do not think you have the latest dal.py.
Please download a clean new one.


On Dec 10, 1:25 am, David Marko dma...@tiscali.cz wrote:
 I'm running latest trunk version of web2py and trying using DAL with
 CouchDB. I'm still getting following error.

 Traceback (most recent call last):
 File c:\java\web2py\gluon\main.py, line 488, in wsgibase
 BaseAdapter.close_all_instances(BaseAdapter.rollback)
 File c:\java\web2py\gluon\dal.py, line 270, in close_all_instances
 action(instance)
 File c:\java\web2py\gluon\dal.py, line 1026, in rollback
 return self.connection.rollback()
 AttributeError: 'Server' object has no attribute 'rollback'

 Is there something I'm missing?

 David


[web2py] Re: it case you missed it...

2010-12-10 Thread mdipierro
You are right. turning it into a new web2py blog has been on my todo
list.

On Dec 10, 7:23 am, Albert Abril albert.ab...@gmail.com wrote:
 Agree too, 'old web2py blog' and the 'flash' informing that the info could
 be oudated...
 ..If we're linking to the new DAL, recently wrote. :D

 Hopefully this is constructive criticism too ;)

 On Fri, Dec 10, 2010 at 9:24 AM, Bruno Rocha rochacbr...@gmail.com wrote:
  ego should wear the same layout as web2py main site (examples app)




[web2py] Re: how to do content negotiation with web2py

2010-12-10 Thread mdipierro
Actually this is done automatically.

if you call http://.../index.html web2py will use view index.html
if you call http://.../index.xml  web2py will use view index.xml
etc.

Anyway, programmatically you have access to

request.extension == 'xml'

and

request.env which contains the http header + wsgi variables.

On Dec 10, 8:12 am, selecta gr...@delarue-berlin.de wrote:
 how to do content negotiation with web2py? something like

 def myfkt():
    if reques.header ??? xml:
       redirect(URL(r=request, f=myfkt.xml, vars=request.vars,
 args=request.args))


[web2py] Re: in link i will post a string

2010-12-10 Thread mdipierro
you can make it shorter with

var button = Anmelden;
console.log(button);
$.ajax({ url: {{=URL('user')}},button: button });

but are you sure you want to call the 'user' action?


On Dec 10, 7:49 am, pk peter.kirch...@youngdesigners.de wrote:
 my js:
 var button = Anmelden;
             console.log(button);
             $.ajax({ url: {{=URL(r=request,c='default',f='user')}},
 button: button });

 my default-controller:
 return(request.vars.button)

 but why is the return value: none ??

 thanks


Re: [web2py] grid

2010-12-10 Thread Richard Vézina
Here other links fruit of my search for a fixed header and left column
jQuery plugin :

http://cross-browser.com/x/lib/view.php?s=xlibrary
http://cross-browser.com/x/lib/view.php?s=xlibraryOther library like
jQuery (as far as I understand) seems very rich GPL

http://johnsobrepena.blogspot.com/search/label/CoolGridView
An other grid

Thread on stackoverflow
http://stackoverflow.com/questions/673153/html-table-with-fixed-headers


http://plugins.jquery.com/project/sfht
Chromatable easy to integrate in web2py, nice css, good for table that fit
in page width, fixed header

http://code.google.com/p/js-scroll-table-header/

http://jeromebulanadi.wordpress.com/2010/03/22/scrollable-fixed-header-table-a-jquery-plugin/
Seems really interresting demo :
http://jeromebulanadi.oni.cc/scrollablefixedheader.html

http://tablesorter.com/docs/


Richard






On Fri, Dec 10, 2010 at 12:37 AM, Bruno Rocha rochacbr...@gmail.com wrote:


 Forget about what I said,

 DataTables is the best one so far!

 http://www.datatables.net/examples/server_side/server_side.html

 I am having a good time with this one, all features in one table plugin.

 This is already in /plugins http://web2py.com/plugins/default/datatable,
 but need more documentation, recipes, helpers and more attention.



 --

 Bruno Rocha
 http://about.me/rochacbruno/bio



[web2py] Re: Logging of impersonation events

2010-12-10 Thread Markus Schmitz
Hi Massimo,

excellent and appreciated. We stumble forward in our quest for the
perfect web2py application.

Thanks

Markus

On Dec 8, 9:16 am, mdipierro mdipie...@cs.depaul.edu wrote:
 I will add logging.

 Mind that it has pointed out that impersonate/0 presents a mild
 security risk. We have already changed the impersonate action in trunk
 and not you have to submit the user_id via POST to impersonate.

 I am still not 100% happy with this but since it is a security issue
 we are breaking backward compatibility for this action. The change for
 you will be minimal.

 Massimo

 On Dec 8, 1:12 am, Markus Schmitz mschm...@soft-impact.com wrote:







  Hi everybody,

  I am working on a new site, where we also plan to use the
  impersonation feature for support purposes, which is very helpful.
  The impersonation works perfectly, but it looks like there is no log
  in the auth_event table of this happening.

  Is this intended or did I look at the wrong place?

  Also as I can go back to the original user with impersonate/0, where
  does web2py store the original user? We could use this to store on
  each update and create not only the current user, but also the actual
  user (similar to the effective and actual user id in unix systems).

  Regards

  Markus


[web2py] Re: needs more new dal testers

2010-12-10 Thread mart
when I made the switch, this (just below) was working great. With the
latest code it doesn't. I was able to switch my import statements
from blablabla.sql import DAL to  from blablabla.dal import DAL.
Has the syntax changed?

Thanks,

Mart :)

tbl = tableParam
for mTbl in db.tables:
if tbl in mTbl:
if mTbl.startswith(tbl):
rows = db(db[mTbl].name==name).select()
for row in rows:
if row.name == name and row.value  0:
id = row.id

if id != None:
db(db[tbl].name==name).update(name=name,
  value=value)
else:
db[tbl].insert(name=name,
   value=value)


On Dec 10, 10:12 am, mdipierro mdipie...@cs.depaul.edu wrote:
 On Dec 9, 11:49 pm, Michael McGinnis ish...@biographiks.com wrote:

  I could run 1.89.5 (2010-11-21 22:12:54)
  with ./jython web2py/web2py.py (no cron because no file locking,
  though) just fine onhttp://127.0.0.1:8000/admin/default/site
  though I got errors on several other apps 
  includinghttp://127.0.0.1:8000/welcome/default/index:
  type 'exceptions.RuntimeError'(global name 'sqlite3' is not defined
  (tried 5 times))

 this just means you do not have sqlite with jdbc.



  For what it's worth, this is what I get when I try to run the old dal
  as a standalone file:
  mich...@doulos:~/jython2.5.2rc2$ ./jython dal.py
  Traceback (most recent call last):
    File dal.py, line 51, in module
      from utils import md5_hash, web2py_uuid
  ImportError: No module named utils

 hmm. that line is not in line 51.

  On Dec 9, 11:25 pm, mdipierro mdipie...@cs.depaul.edu wrote:

   I think the problem is that it not finding any driver. It is not even
   defining db.
   Did the old dal worked with jython.

   good pypy works for you. It crashes with segmentation fault on me.

   On Dec 9, 11:17 pm, Michael McGinnis ish...@biographiks.com wrote:

I've never used either one before. But no errors on pypy-1.4.
For jython-2.5.2rc2, here is a typical message, apparently one of 77:
**
File dal.py, line 4874, in __main__.test_all
Failed example:
    db.paper.drop()
Exception raised:
    Traceback (most recent call last):
      File /home/michael/jython2.5.2rc2/Lib/doctest.py, line 1235,
in _DocTestRunner__run
        exec compile(example.source, filename, single,
      File doctest __main__.test_all[63], line 1, in module
        db.paper.drop()
    NameError: name 'db' is not defined
**
2 items had failures:
  15 of  15 in __main__
  62 of  64 in __main__.test_all
***Test Failed*** 77 failures.

On Dec 8, 9:28 pm, mdipierro mdipie...@cs.depaul.edu wrote:

 Can you try jython and pypy and do

 jython dal.py
 pypy dal.py

 Please report any error.

 Massimo




[web2py] Re: new dal

2010-12-10 Thread mart
apologies, I may have posted this in the wrong thread. Reposting, just
in case:



when I made the switch, this (just below) was working great. With the
latest code it doesn't. I was able to switch my import statements
from blablabla.sql import DAL to  from blablabla.dal import DAL.
Has the syntax changed?

Thanks,

Mart :)

tbl = tableParam
for mTbl in db.tables:
if tbl in mTbl:
if mTbl.startswith(tbl):
rows = db(db[mTbl].name==name).select()
for row in rows:
if row.name == name and row.value  0:
id = row.id

if id != None:
db(db[tbl].name==name).update(name=name,
  value=value)
else:
db[tbl].insert(name=name,
   value=value)

On Dec 9, 10:22 pm, Mariano Reingart reing...@gmail.com wrote:
 There seems to be a problem with options widget and new dal:

 http://code.google.com/p/web2py/issues/detail?id=136

 Widget seems to be generating string fields (i.e. 'tipo_cbte.desc,
 tipo_cbte.cod'), and dal is specting Expressions.

 Best regards,

 Mariano Reingarthttp://www.sistemasagiles.com.arhttp://reingart.blogspot.com


[web2py] Re: What's the preferred way to clean up the URLs?

2010-12-10 Thread Wikus van de Merwe
Put following rules into your routes.py to get exactly what you
described:

routes_in = (
(/, /myapp/default/index),
(/([a-z0-9]+)/?, r/myapp/default/\1),
(/(.*), r/myapp/\1)
)

routes_out = (
(/myapp/default/index, /),
(/myapp/default/(.*), r/\1),
(/myapp/(.*), r/\1)
)
Notice that this have some limitations. You can
use /controller/function/arg1/arg2/arg3 for any controller including
the default one and it will be mapped
to /myapp/controller/function/arg1/arg2/arg3. But if you use a 1
segment url e.g. (/function) as a shortcut to the default
controller /myapp/default/function no parameters can follow.
Otherwise this /function/arg1/arg2 will be mapped incorrectly
to /myapp/function/arg1/arg2 instead
of /myapp/default/function/arg1/arg2.

If you really need that to work, you need to follow the example given
by Jonathan and implicitly list the default functions in routes.py,
like this:
DEFAULTS = [index, about, privacy, api]
(/(%s.*) % |.join(DEFAULTS), r/myapp/default/\1) -- second rule
in routes_in
(/myapp/default/(%s.* % |.join(DEFAULTS), r/\1), -- second rule
in routes_out

[web2py] upload files in specific sub-folders

2010-12-10 Thread Carlos
Hi,

Is there any way to upload files in specific sub-folders?.

I have multiple organizations and I have a requirement to upload all
files to the respective organization sub-folder.

Thanks,

   Carlos


[web2py] XML service

2010-12-10 Thread villas
If I make a function with named fields,  e.g.

def cargroup():
carlist =
db(db.cargroup).select('descr','seats',orderby=descr).as_list()
return dict(carlist=carlist)

Then call it with .xml extension,  I get an _extra tag element for
each row,  e.g.:

item_extradescrChevrolet Matiz/descrseats3/seats/_extra/
item

Why do we have the _extra tag?  If I do not specify fields,  then I
don't see that.  Is it a bug?

-D


[web2py] Float field error when using wizard

2010-12-10 Thread Luther Goh Lu Feng
I am running the nightly build. I am using sqlite. When creating
fields in step 3 of the wizard, entering amount float results in the
following error:

==
Traceback (most recent call last):
  File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/
restricted.py, line 188, in restricted
exec ccode in environment
  File /Users/elfgoh/Projects/mustardjuice/web2py/applications/
mustardjuice/models/db_wizard.py, line 58, in module
migrate=settings.migrate)
  File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/sql.py, line
3301, in define_table
polymodel=polymodel)
  File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/sql.py, line
441, in create_table
(field.type, field.name)
SyntaxError: Field: unknown field type: float for f_amount
==

Replacing the field with amount or amount integer does not cause
the error. Is this a bug?


[web2py] Web2py Application Exhibition and Samsung Galaxy Tab p1000

2010-12-10 Thread NetAdmin

Hello All,

*IF* I were eligible to win the Web2py Application Exhibition, I'd
totally use
the winnings as a down-payment on a Samsung Galaxy Tab!

 The deadline for submissions for the
 Web2py Application Exhibition is December 15th 2010

 You can start submitting and voting for the entries
 for the Web2py Application Exhibition Version 2.0

 To get started, go to the following link...
 http://w2pexhibition.appspot.com/

 There is a sample application entry by Martin Mulone
 that will give you an idea of how to use the
 voting application.

 Many thanks to Martin Mulone for coding the app
 to handle submission and voting!

 Good Luck!

 Mr.NetAdmin


Re: [web2py] grid

2010-12-10 Thread Thadeus Burgess
I really enjoy working with DataTables. It is easy to use and extremely
configurable!

Not only that, but it can load results from any JSON request, so you can
handle filtering, ordering, and pagination in your queries on the server.

--
Thadeus




On Fri, Dec 10, 2010 at 9:43 AM, Richard Vézina ml.richard.vez...@gmail.com
 wrote:

 Here other links fruit of my search for a fixed header and left column
 jQuery plugin :

 http://cross-browser.com/x/lib/view.php?s=xlibrary
  http://cross-browser.com/x/lib/view.php?s=xlibraryOther library like
 jQuery (as far as I understand) seems very rich GPL

 http://johnsobrepena.blogspot.com/search/label/CoolGridView
 An other grid

 Thread on stackoverflow
 http://stackoverflow.com/questions/673153/html-table-with-fixed-headers


 http://plugins.jquery.com/project/sfht
 Chromatable easy to integrate in web2py, nice css, good for table that fit
 in page width, fixed header

 http://code.google.com/p/js-scroll-table-header/


 http://jeromebulanadi.wordpress.com/2010/03/22/scrollable-fixed-header-table-a-jquery-plugin/
 Seems really interresting demo :
 http://jeromebulanadi.oni.cc/scrollablefixedheader.html

 http://tablesorter.com/docs/


 Richard






 On Fri, Dec 10, 2010 at 12:37 AM, Bruno Rocha rochacbr...@gmail.comwrote:


 Forget about what I said,

 DataTables is the best one so far!

 http://www.datatables.net/examples/server_side/server_side.html

 I am having a good time with this one, all features in one table plugin.

 This is already in /plugins http://web2py.com/plugins/default/datatable,
 but need more documentation, recipes, helpers and more attention.



 --

 Bruno Rocha
 http://about.me/rochacbruno/bio





[web2py] Re: it case you missed it...

2010-12-10 Thread pbreit
Is there a decent Web2py-based blogging appliance? It would be great to
have some good implementations of some core apps like blog, forums,
CRM, etc.

Re: [web2py] Web2py Application Exhibition and Samsung Galaxy Tab p1000

2010-12-10 Thread Bruno Rocha
If I can finish my new open source app until the deadline I will send.

I am also writing a new plugin dor datatables.net, is this elegible?

2010/12/10 NetAdmin mr.netad...@gmail.com


 Hello All,

 *IF* I were eligible to win the Web2py Application Exhibition, I'd
 totally use
 the winnings as a down-payment on a Samsung Galaxy Tab!

  The deadline for submissions for the
  Web2py Application Exhibition is December 15th 2010

  You can start submitting and voting for the entries
  for the Web2py Application Exhibition Version 2.0

  To get started, go to the following link...
  http://w2pexhibition.appspot.com/

  There is a sample application entry by Martin Mulone
  that will give you an idea of how to use the
  voting application.

  Many thanks to Martin Mulone for coding the app
  to handle submission and voting!

  Good Luck!

  Mr.NetAdmin




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


Re: [web2py] Re: it case you missed it...

2010-12-10 Thread Bruno Rocha
2010/12/10 pbreit pbreitenb...@gmail.com

 Is there a decent Web2py-based blogging appliance?


Instant Press! instant2press.com



 It would be great to have some good implementations of some core apps like
 blog, forums, CRM, etc.




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


Re: [web2py] Re: it case you missed it...

2010-12-10 Thread Bruno Rocha
latinux is using this in production: http://pressroom.latinux.com/

2010/12/10 Bruno Rocha rochacbr...@gmail.com



 2010/12/10 pbreit pbreitenb...@gmail.com

 Is there a decent Web2py-based blogging appliance?


 Instant Press! instant2press.com



 It would be great to have some good implementations of some core apps like
 blog, forums, CRM, etc.




 --

 Bruno Rocha
 http://about.me/rochacbruno/bio




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


Re: [web2py] Web2py Application Exhibition and Samsung Galaxy Tab p1000

2010-12-10 Thread Mr admin
Bruno,

Yes the plugin will be eligible, and as far as finishing the app... all good
programs change and evolve over time, so they're never REALLY ever finished
right?

They just get a version bump  :-)

Good Luck!

Mr.NetAdmin


On Fri, Dec 10, 2010 at 3:00 PM, Bruno Rocha rochacbr...@gmail.com wrote:

 If I can finish my new open source app until the deadline I will send.

 I am also writing a new plugin dor datatables.net, is this elegible?

 2010/12/10 NetAdmin mr.netad...@gmail.com


 Hello All,

 *IF* I were eligible to win the Web2py Application Exhibition, I'd
 totally use
 the winnings as a down-payment on a Samsung Galaxy Tab!

  The deadline for submissions for the
  Web2py Application Exhibition is December 15th 2010

  You can start submitting and voting for the entries
  for the Web2py Application Exhibition Version 2.0

  To get started, go to the following link...
  http://w2pexhibition.appspot.com/

  There is a sample application entry by Martin Mulone
  that will give you an idea of how to use the
  voting application.

  Many thanks to Martin Mulone for coding the app
  to handle submission and voting!

  Good Luck!

  Mr.NetAdmin




 --

 Bruno Rocha
 http://about.me/rochacbruno/bio



[web2py] Re: SEO Tips How this can be applied in web2py apps?

2010-12-10 Thread GoldenTiger
I am thinking about it too.

Concerning Pagerank, the 301 redirection it is important for web2py
domains.

Google see http://web2py.com and http://www.web2py.com as different
domains.
Maybe, that's the reason of recent decrease of web2py.com's pagerank
from 6 to 4.

Helpful links about this:

Preferred domain (www or non-www)
http://www.google.com/support/webmasters/bin/answer.py?hl=enanswer=44231from=44232rd=1

301 redirects
http://www.google.com/support/webmasters/bin/answer.py?hl=enanswer=93633


Re: [web2py] grid

2010-12-10 Thread Richard Vézina
Can help test!

Just ask.

Richard

On Fri, Dec 10, 2010 at 4:20 PM, Bruno Rocha rochacbr...@gmail.com wrote:

 2010/12/10 Thadeus Burgess thade...@thadeusb.com

 I really enjoy working with DataTables. It is easy to use and extremely
 configurable!

 Not only that, but it can load results from any JSON request, so you can
 handle filtering, ordering, and pagination in your queries on the server.


 I am writing a new plugin for datatables, I want to have many features of
 the datatables API available as PluginManager() attributes.

 This is already working for me now with VirtualFields and VirtualLabels,
 DetailTables etc, and uses JqueryUI ThemeRoller. (look the screenshot)

 I will add today the export feature (excel, csv, txt) and sorting/ordering.

 This works in this way:

 code
 plugins = PluginManager()
 datatable = plugins.datatable

 #a class which every methos became field, method docstring become field
 label
 datatable.virtualfields = Virtual()

 # if you dont want to use docstrings as labels, you can pass a dict
 datatable.virtuallabels = {'virtual.field1':T('label
 1'),'virtual.field2':T('label 2')}

 #datasource can be query, set, rows, xml, json or an ajax callback
 datatable.datasource = db(db.table).select()

 #accepts the same attributes that SQLTABLE ('linkto', 'orderby' etc)
 datatable.headers='labels'

 #you can pass html attr
 datatable._class='datatable'
 datatable._width='100%'

 #function that returns the datatable html+JavaScript
 list = datatable.create()

 /code


 I am testing and implementing every feature of DataTables API as I need to
 my project.

 Is there anybody interesting in contribute?

 --

 Bruno Rocha
 http://about.me/rochacbruno/bio



Re: [web2py] grid

2010-12-10 Thread Richard Vézina
What's about fixed column with DataTables or other grid plugin?

My table are very large...

I can't remeber if jqgrid where exposing a lateral scroll bar when width is
fixed.

Regards

Richard

On Fri, Dec 10, 2010 at 3:58 PM, Thadeus Burgess thade...@thadeusb.comwrote:

 I really enjoy working with DataTables. It is easy to use and extremely
 configurable!

 Not only that, but it can load results from any JSON request, so you can
 handle filtering, ordering, and pagination in your queries on the server.

 --
 Thadeus





 On Fri, Dec 10, 2010 at 9:43 AM, Richard Vézina 
 ml.richard.vez...@gmail.com wrote:

 Here other links fruit of my search for a fixed header and left column
 jQuery plugin :

 http://cross-browser.com/x/lib/view.php?s=xlibrary
  http://cross-browser.com/x/lib/view.php?s=xlibraryOther library like
 jQuery (as far as I understand) seems very rich GPL

 http://johnsobrepena.blogspot.com/search/label/CoolGridView
 An other grid

 Thread on stackoverflow
 http://stackoverflow.com/questions/673153/html-table-with-fixed-headers


 http://plugins.jquery.com/project/sfht
 Chromatable easy to integrate in web2py, nice css, good for table that fit
 in page width, fixed header

 http://code.google.com/p/js-scroll-table-header/


 http://jeromebulanadi.wordpress.com/2010/03/22/scrollable-fixed-header-table-a-jquery-plugin/
 Seems really interresting demo :
 http://jeromebulanadi.oni.cc/scrollablefixedheader.html

 http://tablesorter.com/docs/


 Richard






 On Fri, Dec 10, 2010 at 12:37 AM, Bruno Rocha rochacbr...@gmail.comwrote:


 Forget about what I said,

 DataTables is the best one so far!

 http://www.datatables.net/examples/server_side/server_side.html

 I am having a good time with this one, all features in one table plugin.

 This is already in /plugins http://web2py.com/plugins/default/datatable,
 but need more documentation, recipes, helpers and more attention.



 --

 Bruno Rocha
 http://about.me/rochacbruno/bio






Re: [web2py] grid

2010-12-10 Thread Richard Vézina
It have a fixed column feature :

http://www.datatables.net/release-datatables/extras/FixedColumns/index.html

http://www.datatables.net/release-datatables/extras/FixedColumns/index.html
Great!

Richard

On Fri, Dec 10, 2010 at 5:08 PM, Richard Vézina ml.richard.vez...@gmail.com
 wrote:

 What's about fixed column with DataTables or other grid plugin?

 My table are very large...

 I can't remeber if jqgrid where exposing a lateral scroll bar when width is
 fixed.

 Regards

 Richard


 On Fri, Dec 10, 2010 at 3:58 PM, Thadeus Burgess thade...@thadeusb.comwrote:

 I really enjoy working with DataTables. It is easy to use and extremely
 configurable!

 Not only that, but it can load results from any JSON request, so you can
 handle filtering, ordering, and pagination in your queries on the server.

 --
 Thadeus





 On Fri, Dec 10, 2010 at 9:43 AM, Richard Vézina 
 ml.richard.vez...@gmail.com wrote:

 Here other links fruit of my search for a fixed header and left column
 jQuery plugin :

 http://cross-browser.com/x/lib/view.php?s=xlibrary
  http://cross-browser.com/x/lib/view.php?s=xlibraryOther library like
 jQuery (as far as I understand) seems very rich GPL

 http://johnsobrepena.blogspot.com/search/label/CoolGridView
 An other grid

 Thread on stackoverflow
 http://stackoverflow.com/questions/673153/html-table-with-fixed-headers


 http://plugins.jquery.com/project/sfht
 Chromatable easy to integrate in web2py, nice css, good for table that
 fit in page width, fixed header

 http://code.google.com/p/js-scroll-table-header/


 http://jeromebulanadi.wordpress.com/2010/03/22/scrollable-fixed-header-table-a-jquery-plugin/
 Seems really interresting demo :
 http://jeromebulanadi.oni.cc/scrollablefixedheader.html

 http://tablesorter.com/docs/


 Richard






 On Fri, Dec 10, 2010 at 12:37 AM, Bruno Rocha rochacbr...@gmail.comwrote:


 Forget about what I said,

 DataTables is the best one so far!

 http://www.datatables.net/examples/server_side/server_side.html

 I am having a good time with this one, all features in one table plugin.

 This is already in /plugins http://web2py.com/plugins/default/datatable,
 but need more documentation, recipes, helpers and more attention.



 --

 Bruno Rocha
 http://about.me/rochacbruno/bio







[web2py] Re: Float field error when using wizard

2010-12-10 Thread mdipierro
I think it is fixed now in trunk, please check.

Massimo

On Dec 10, 2:15 pm, Luther Goh Lu Feng elf...@yahoo.com wrote:
 I am running the nightly build. I am using sqlite. When creating
 fields in step 3 of the wizard, entering amount float results in the
 following error:

 ==
 Traceback (most recent call last):
   File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/
 restricted.py, line 188, in restricted
     exec ccode in environment
   File /Users/elfgoh/Projects/mustardjuice/web2py/applications/
 mustardjuice/models/db_wizard.py, line 58, in module
     migrate=settings.migrate)
   File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/sql.py, line
 3301, in define_table
     polymodel=polymodel)
   File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/sql.py, line
 441, in create_table
     (field.type, field.name)
 SyntaxError: Field: unknown field type: float for f_amount
 ==

 Replacing the field with amount or amount integer does not cause
 the error. Is this a bug?


[web2py] Re: Logging of impersonation events

2010-12-10 Thread mdipierro
I added the log. Can you please check it?


On Dec 8, 1:12 am, Markus Schmitz mschm...@soft-impact.com wrote:
 Hi everybody,

 I am working on a new site, where we also plan to use the
 impersonation feature for support purposes, which is very helpful.
 The impersonation works perfectly, but it looks like there is no log
 in the auth_event table of this happening.

 Is this intended or did I look at the wrong place?

 Also as I can go back to the original user with impersonate/0, where
 does web2py store the original user? We could use this to store on
 each update and create not only the current user, but also the actual
 user (similar to the effective and actual user id in unix systems).

 Regards

 Markus


Re: [web2py] grid

2010-12-10 Thread Bruno Rocha
in my TODO:
plugin.datatable.fixed = ['header','column']

I'll try to release it for testing today, and put it to bitbucket.


2010/12/10 Richard Vézina ml.richard.vez...@gmail.com

 It have a fixed column feature :

 http://www.datatables.net/release-datatables/extras/FixedColumns/index.html


 http://www.datatables.net/release-datatables/extras/FixedColumns/index.html
 Great!

 Richard


 On Fri, Dec 10, 2010 at 5:08 PM, Richard Vézina 
 ml.richard.vez...@gmail.com wrote:

 What's about fixed column with DataTables or other grid plugin?

 My table are very large...

 I can't remeber if jqgrid where exposing a lateral scroll bar when width
 is fixed.

 Regards

 Richard


 On Fri, Dec 10, 2010 at 3:58 PM, Thadeus Burgess 
 thade...@thadeusb.comwrote:

 I really enjoy working with DataTables. It is easy to use and extremely
 configurable!

 Not only that, but it can load results from any JSON request, so you can
 handle filtering, ordering, and pagination in your queries on the server.

 --
 Thadeus





 On Fri, Dec 10, 2010 at 9:43 AM, Richard Vézina 
 ml.richard.vez...@gmail.com wrote:

 Here other links fruit of my search for a fixed header and left column
 jQuery plugin :

 http://cross-browser.com/x/lib/view.php?s=xlibrary
  http://cross-browser.com/x/lib/view.php?s=xlibraryOther library like
 jQuery (as far as I understand) seems very rich GPL

 http://johnsobrepena.blogspot.com/search/label/CoolGridView
 An other grid

 Thread on stackoverflow
 http://stackoverflow.com/questions/673153/html-table-with-fixed-headers


 http://plugins.jquery.com/project/sfht
 Chromatable easy to integrate in web2py, nice css, good for table that
 fit in page width, fixed header

 http://code.google.com/p/js-scroll-table-header/


 http://jeromebulanadi.wordpress.com/2010/03/22/scrollable-fixed-header-table-a-jquery-plugin/
 Seems really interresting demo :
 http://jeromebulanadi.oni.cc/scrollablefixedheader.html

 http://tablesorter.com/docs/


 Richard






 On Fri, Dec 10, 2010 at 12:37 AM, Bruno Rocha rochacbr...@gmail.comwrote:


 Forget about what I said,

 DataTables is the best one so far!

 http://www.datatables.net/examples/server_side/server_side.html

 I am having a good time with this one, all features in one table
 plugin.

 This is already in /plugins
 http://web2py.com/plugins/default/datatable, but need more
 documentation, recipes, helpers and more attention.



 --

 Bruno Rocha
 http://about.me/rochacbruno/bio








-- 

Bruno Rocha
http://about.me/rochacbruno/bio


[web2py] Re: SEO Tips How this can be applied in web2py apps?

2010-12-10 Thread mdipierro
where do you see this?
 Maybe, that's the reason of recent decrease of web2py.com's pagerank
 from 6 to 4.

On Dec 10, 3:17 pm, GoldenTiger goldenboy...@gmail.com wrote:
 I am thinking about it too.

 Concerning Pagerank, the 301 redirection it is important for web2py
 domains.

 Google seehttp://web2py.comandhttp://www.web2py.comas different
 domains.
 Maybe, that's the reason of recent decrease of web2py.com's pagerank
 from 6 to 4.

 Helpful links about this:

 Preferred domain (www or 
 non-www)http://www.google.com/support/webmasters/bin/answer.py?hl=enanswer=4...

 301 
 redirectshttp://www.google.com/support/webmasters/bin/answer.py?hl=enanswer=9...


[web2py] how to generate database dumps with DAL

2010-12-10 Thread Richard
I have a CSV file and want to generate dumps of the data for sqlite,
mysql, postgres, etc.


My current workflow is to insert the data in each database and then use
mysqldump, etc to generate the dump files.

I read that the DAL is now a standalone module - great!
Is it possible to use the DAL to purely generate the required SQL for a
database without actually inserting or even installing the database?

[web2py] Re: how to generate database dumps with DAL

2010-12-10 Thread mdipierro
if you do


db.export_to_csv_file(open('myfile.csv','wb'))

you get a csv dump of the db and you do

db.import_from_csv_file(open('myfile.csv','rb'))

you get a restore. The myfile.csv is a csv file and it is not specific
of one db engine.

Massimo



On Dec 10, 4:38 pm, Richard richar...@gmail.com wrote:
 I have a CSV file and want to generate dumps of the data for sqlite,
 mysql, postgres, etc.

 My current workflow is to insert the data in each database and then use
 mysqldump, etc to generate the dump files.

 I read that the DAL is now a standalone module - great!
 Is it possible to use the DAL to purely generate the required SQL for a
 database without actually inserting or even installing the database?


[web2py] More than one model/controller file for plugins.

2010-12-10 Thread Bruno Rocha
Hi,

regarding the creation of plugins,
can I have more than one file in /models or /controllers for each plugin?

I tried:
/models/
plugin_datatable.py
plugin_datatable.secondmodel.py
plugin_datatable.thirdmodel.py

Also in /controllers

But web2py does not execute the files named in this way
plugin_name.anothername.py, and when packing a plugin these files are not
included in plugin.

can I have a folder inside /models or /controllers ?

/models/db.py
/models/plugin_datatable/plugindb.py

or another way to have more files by plugin?


Thank you.


-- 

Bruno Rocha
http://about.me/rochacbruno/bio


[web2py] Re: More than one model/controller file for plugins.

2010-12-10 Thread mdipierro
No. Sorry. The problem is that the more complex we make this the
slower it gets.

On Dec 10, 6:03 pm, Bruno Rocha rochacbr...@gmail.com wrote:
 Hi,

 regarding the creation of plugins,
 can I have more than one file in /models or /controllers for each plugin?

 I tried:
 /models/
 plugin_datatable.py
 plugin_datatable.secondmodel.py
 plugin_datatable.thirdmodel.py

 Also in /controllers

 But web2py does not execute the files named in this way
 plugin_name.anothername.py, and when packing a plugin these files are not
 included in plugin.

 can I have a folder inside /models or /controllers ?

 /models/db.py
 /models/plugin_datatable/plugindb.py

 or another way to have more files by plugin?

 Thank you.

 --

 Bruno Rochahttp://about.me/rochacbruno/bio


Re: [web2py] Re: More than one model/controller file for plugins.

2010-12-10 Thread Thadeus Burgess
It will work within a subfolder (I have done it) unless things have changed
it will work just fine (and still execute in alphabhetical order)

1 a_settings.py
b(folder) -
2   - a.py
3   - c.py
4   - d.py
5 c.py

It should execute correctly in the above order

--
Thadeus




On Fri, Dec 10, 2010 at 6:06 PM, mdipierro mdipie...@cs.depaul.edu wrote:

 No. Sorry. The problem is that the more complex we make this the
 slower it gets.

 On Dec 10, 6:03 pm, Bruno Rocha rochacbr...@gmail.com wrote:
  Hi,
 
  regarding the creation of plugins,
  can I have more than one file in /models or /controllers for each plugin?
 
  I tried:
  /models/
  plugin_datatable.py
  plugin_datatable.secondmodel.py
  plugin_datatable.thirdmodel.py
 
  Also in /controllers
 
  But web2py does not execute the files named in this way
  plugin_name.anothername.py, and when packing a plugin these files are
 not
  included in plugin.
 
  can I have a folder inside /models or /controllers ?
 
  /models/db.py
  /models/plugin_datatable/plugindb.py
 
  or another way to have more files by plugin?
 
  Thank you.
 
  --
 
  Bruno Rochahttp://about.me/rochacbruno/bio



Re: [web2py] Re: how to generate database dumps with DAL

2010-12-10 Thread Thadeus Burgess
db.export_to_csv_file will only contain the raw data, it will not include
any of the database specific things (such as indexies, mysql/postgres users,
stored procedures, sequence stores, etc...)


--
Thadeus




On Fri, Dec 10, 2010 at 5:24 PM, mdipierro mdipie...@cs.depaul.edu wrote:

 if you do


 db.export_to_csv_file(open('myfile.csv','wb'))

 you get a csv dump of the db and you do

 db.import_from_csv_file(open('myfile.csv','rb'))

 you get a restore. The myfile.csv is a csv file and it is not specific
 of one db engine.

 Massimo



 On Dec 10, 4:38 pm, Richard richar...@gmail.com wrote:
  I have a CSV file and want to generate dumps of the data for sqlite,
  mysql, postgres, etc.
 
  My current workflow is to insert the data in each database and then use
  mysqldump, etc to generate the dump files.
 
  I read that the DAL is now a standalone module - great!
  Is it possible to use the DAL to purely generate the required SQL for a
  database without actually inserting or even installing the database?



[web2py] Re: More than one model/controller file for plugins.

2010-12-10 Thread mdipierro
I am not sure this is intended. This may create problems for
compilation. Moreover I was planning to reserve this syntax (subfolder
in models) for models that should be executed conditionally.

If it works good but do not rely on it.

Massimo

On Dec 10, 6:21 pm, Thadeus Burgess thade...@thadeusb.com wrote:
 It will work within a subfolder (I have done it) unless things have changed
 it will work just fine (and still execute in alphabhetical order)

 1 a_settings.py
 b(folder) -
 2   - a.py
 3   - c.py
 4   - d.py
 5 c.py

 It should execute correctly in the above order

 --
 Thadeus

 On Fri, Dec 10, 2010 at 6:06 PM, mdipierro mdipie...@cs.depaul.edu wrote:
  No. Sorry. The problem is that the more complex we make this the
  slower it gets.

  On Dec 10, 6:03 pm, Bruno Rocha rochacbr...@gmail.com wrote:
   Hi,

   regarding the creation of plugins,
   can I have more than one file in /models or /controllers for each plugin?

   I tried:
   /models/
   plugin_datatable.py
   plugin_datatable.secondmodel.py
   plugin_datatable.thirdmodel.py

   Also in /controllers

   But web2py does not execute the files named in this way
   plugin_name.anothername.py, and when packing a plugin these files are
  not
   included in plugin.

   can I have a folder inside /models or /controllers ?

   /models/db.py
   /models/plugin_datatable/plugindb.py

   or another way to have more files by plugin?

   Thank you.

   --

   Bruno Rochahttp://about.me/rochacbruno/bio




Re: [web2py] Re: More than one model/controller file for plugins.

2010-12-10 Thread Bruno Rocha
No Problem.

I'll put aditional functions in /modules/plugin_datatablex.py
plugin_datatabley.py etc..

and them import this at my model in models/plugin_datatable.py

ok?

2010/12/10 mdipierro mdipie...@cs.depaul.edu

 I am not sure this is intended. This may create problems for
 compilation. Moreover I was planning to reserve this syntax (subfolder
 in models) for models that should be executed conditionally.

 If it works good but do not rely on it.

 Massimo

 On Dec 10, 6:21 pm, Thadeus Burgess thade...@thadeusb.com wrote:
  It will work within a subfolder (I have done it) unless things have
 changed
  it will work just fine (and still execute in alphabhetical order)
 
  1 a_settings.py
  b(folder) -
  2   - a.py
  3   - c.py
  4   - d.py
  5 c.py
 
  It should execute correctly in the above order
 
  --
  Thadeus
 
  On Fri, Dec 10, 2010 at 6:06 PM, mdipierro mdipie...@cs.depaul.edu
 wrote:
   No. Sorry. The problem is that the more complex we make this the
   slower it gets.
 
   On Dec 10, 6:03 pm, Bruno Rocha rochacbr...@gmail.com wrote:
Hi,
 
regarding the creation of plugins,
can I have more than one file in /models or /controllers for each
 plugin?
 
I tried:
/models/
plugin_datatable.py
plugin_datatable.secondmodel.py
plugin_datatable.thirdmodel.py
 
Also in /controllers
 
But web2py does not execute the files named in this way
plugin_name.anothername.py, and when packing a plugin these files
 are
   not
included in plugin.
 
can I have a folder inside /models or /controllers ?
 
/models/db.py
/models/plugin_datatable/plugindb.py
 
or another way to have more files by plugin?
 
Thank you.
 
--
 
Bruno Rochahttp://about.me/rochacbruno/bio
 
 




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


Re: [web2py] Re: More than one model/controller file for plugins.

2010-12-10 Thread Bruno Rocha
Sorry, the correct is:


/modules/plugin_datatable/
  plugin_datatablex.py
  plugin_datatabley.py
  ...

then I will import this modules at /models/plugin_datatable.py

local_import 
http://web2py.com/book/default/docstring/local_import('plugin_datatable/plugin_datatablex')

*will this work?*


2010/12/10 Bruno Rocha rochacbr...@gmail.com

 No Problem.

 I'll put aditional functions in /modules/plugin_datatablex.py
 plugin_datatabley.py etc..

 and them import this at my model in models/plugin_datatable.py

 ok?

 2010/12/10 mdipierro mdipie...@cs.depaul.edu

 I am not sure this is intended. This may create problems for
 compilation. Moreover I was planning to reserve this syntax (subfolder
 in models) for models that should be executed conditionally.

 If it works good but do not rely on it.

 Massimo

 On Dec 10, 6:21 pm, Thadeus Burgess thade...@thadeusb.com wrote:
  It will work within a subfolder (I have done it) unless things have
 changed
  it will work just fine (and still execute in alphabhetical order)
 
  1 a_settings.py
  b(folder) -
  2   - a.py
  3   - c.py
  4   - d.py
  5 c.py
 
  It should execute correctly in the above order
 
  --
  Thadeus
 
  On Fri, Dec 10, 2010 at 6:06 PM, mdipierro mdipie...@cs.depaul.edu
 wrote:
   No. Sorry. The problem is that the more complex we make this the
   slower it gets.
 
   On Dec 10, 6:03 pm, Bruno Rocha rochacbr...@gmail.com wrote:
Hi,
 
regarding the creation of plugins,
can I have more than one file in /models or /controllers for each
 plugin?
 
I tried:
/models/
plugin_datatable.py
plugin_datatable.secondmodel.py
plugin_datatable.thirdmodel.py
 
Also in /controllers
 
But web2py does not execute the files named in this way
plugin_name.anothername.py, and when packing a plugin these files
 are
   not
included in plugin.
 
can I have a folder inside /models or /controllers ?
 
/models/db.py
/models/plugin_datatable/plugindb.py
 
or another way to have more files by plugin?
 
Thank you.
 
--
 
Bruno Rochahttp://about.me/rochacbruno/bio
 
 




 --

 Bruno Rocha
 http://about.me/rochacbruno/bio




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


Re: [web2py] Re: More than one model/controller file for plugins.

2010-12-10 Thread Thadeus Burgess
Just make sure to include an '__init__.py' in your plugin_datatable
folder Then you can have file named whatever you want and import as

/modules/plugin_datatable/
   __init__.py
   util.py
   grid.py

namespace = local_import('plugin_datatable.grid')

newgrid = namespace.Grid()

--
Thadeus




On Fri, Dec 10, 2010 at 7:12 PM, Bruno Rocha rochacbr...@gmail.com wrote:

 Sorry, the correct is:


 /modules/plugin_datatable/
   plugin_datatablex.py
   plugin_datatabley.py
   ...

 then I will import this modules at /models/plugin_datatable.py

 local_import 
 http://web2py.com/book/default/docstring/local_import('plugin_datatable/plugin_datatablex')

 *will this work?*


 2010/12/10 Bruno Rocha rochacbr...@gmail.com

 No Problem.

 I'll put aditional functions in /modules/plugin_datatablex.py
 plugin_datatabley.py etc..

 and them import this at my model in models/plugin_datatable.py

  ok?

 2010/12/10 mdipierro mdipie...@cs.depaul.edu

 I am not sure this is intended. This may create problems for
 compilation. Moreover I was planning to reserve this syntax (subfolder
 in models) for models that should be executed conditionally.

 If it works good but do not rely on it.

 Massimo

 On Dec 10, 6:21 pm, Thadeus Burgess thade...@thadeusb.com wrote:
  It will work within a subfolder (I have done it) unless things have
 changed
  it will work just fine (and still execute in alphabhetical order)
 
  1 a_settings.py
  b(folder) -
  2   - a.py
  3   - c.py
  4   - d.py
  5 c.py
 
  It should execute correctly in the above order
 
  --
  Thadeus
 
  On Fri, Dec 10, 2010 at 6:06 PM, mdipierro mdipie...@cs.depaul.edu
 wrote:
   No. Sorry. The problem is that the more complex we make this the
   slower it gets.
 
   On Dec 10, 6:03 pm, Bruno Rocha rochacbr...@gmail.com wrote:
Hi,
 
regarding the creation of plugins,
can I have more than one file in /models or /controllers for each
 plugin?
 
I tried:
/models/
plugin_datatable.py
plugin_datatable.secondmodel.py
plugin_datatable.thirdmodel.py
 
Also in /controllers
 
But web2py does not execute the files named in this way
plugin_name.anothername.py, and when packing a plugin these files
 are
   not
included in plugin.
 
can I have a folder inside /models or /controllers ?
 
/models/db.py
/models/plugin_datatable/plugindb.py
 
or another way to have more files by plugin?
 
Thank you.
 
--
 
Bruno Rochahttp://about.me/rochacbruno/bio
 
 




 --

 Bruno Rocha
 http://about.me/rochacbruno/bio




 --

 Bruno Rocha
 http://about.me/rochacbruno/bio



Re: [web2py] Re: More than one model/controller file for plugins.

2010-12-10 Thread Bruno Rocha
Thank you!

2010/12/10 Thadeus Burgess thade...@thadeusb.com

 Just make sure to include an '__init__.py' in your plugin_datatable
 folder Then you can have file named whatever you want and import as

 /modules/plugin_datatable/
__init__.py
util.py
grid.py

 namespace = local_import('plugin_datatable.grid')

 newgrid = namespace.Grid()

 --
 Thadeus





 On Fri, Dec 10, 2010 at 7:12 PM, Bruno Rocha rochacbr...@gmail.comwrote:

 Sorry, the correct is:


 /modules/plugin_datatable/
   plugin_datatablex.py
   plugin_datatabley.py
   ...

 then I will import this modules at /models/plugin_datatable.py

 local_import 
 http://web2py.com/book/default/docstring/local_import('plugin_datatable/plugin_datatablex')

 *will this work?*


 2010/12/10 Bruno Rocha rochacbr...@gmail.com

 No Problem.

 I'll put aditional functions in /modules/plugin_datatablex.py
 plugin_datatabley.py etc..

 and them import this at my model in models/plugin_datatable.py

  ok?

 2010/12/10 mdipierro mdipie...@cs.depaul.edu

 I am not sure this is intended. This may create problems for
 compilation. Moreover I was planning to reserve this syntax (subfolder
 in models) for models that should be executed conditionally.

 If it works good but do not rely on it.

 Massimo

 On Dec 10, 6:21 pm, Thadeus Burgess thade...@thadeusb.com wrote:
  It will work within a subfolder (I have done it) unless things have
 changed
  it will work just fine (and still execute in alphabhetical order)
 
  1 a_settings.py
  b(folder) -
  2   - a.py
  3   - c.py
  4   - d.py
  5 c.py
 
  It should execute correctly in the above order
 
  --
  Thadeus
 
  On Fri, Dec 10, 2010 at 6:06 PM, mdipierro mdipie...@cs.depaul.edu
 wrote:
   No. Sorry. The problem is that the more complex we make this the
   slower it gets.
 
   On Dec 10, 6:03 pm, Bruno Rocha rochacbr...@gmail.com wrote:
Hi,
 
regarding the creation of plugins,
can I have more than one file in /models or /controllers for each
 plugin?
 
I tried:
/models/
plugin_datatable.py
plugin_datatable.secondmodel.py
plugin_datatable.thirdmodel.py
 
Also in /controllers
 
But web2py does not execute the files named in this way
plugin_name.anothername.py, and when packing a plugin these files
 are
   not
included in plugin.
 
can I have a folder inside /models or /controllers ?
 
/models/db.py
/models/plugin_datatable/plugindb.py
 
or another way to have more files by plugin?
 
Thank you.
 
--
 
Bruno Rochahttp://about.me/rochacbruno/bio
 
 




 --

 Bruno Rocha
 http://about.me/rochacbruno/bio




 --

 Bruno Rocha
 http://about.me/rochacbruno/bio





-- 

Bruno Rocha
http://about.me/rochacbruno/bio


[web2py] Re: it case you missed it...

2010-12-10 Thread pbreit
Did I read correctly that you might evaluate Web2py's license? It does
seem like GPL could potentially discourage usage since it makes the
code harder to modify. That might be why very few frameworks are GPL:
http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks

[web2py] Re: SEO Tips How this can be applied in web2py apps?

2010-12-10 Thread GoldenTiger
I have a Firefox PageRank toolbar, so I remember the pagerank for my
most visited websites. However, the shown pagerank is outdated (a few
months), and it is not very accurate.
Urltrends displays old recorded stats, when someone checked it time
ago.

http://www.urltrends.com/viewtrend.php?url=http%3A%2F%2Fweb2py.com

Google PageRank™: 5/10
Alexa Traffic Rank: 280,156

Incoming Google Links: 222
Incoming Yahoo Links: 1,246
Overall Incoming Links: 2,555 (Overlap is possible - Estimated 954
unique links)
Outgoing Links: 72 (Ratio: 3.083% - Each Link Receives Approx. 0.059
PR)


[web2py] Re: new dal

2010-12-10 Thread Brian M
Thanks Massimo, executesql() seems to be working well now for SQLite 
MS SQL

[web2py] Re: how to generate database dumps with DAL

2010-12-10 Thread Richard
Thanks Massimo.
My understanding is those functions are for importing a CSV file into
the database, or dumping the database into a CSV file.


However I am trying to avoid writing to the database because I want to
generate dumps for databases I don't have installed, such as Oracle and
MSSQL.
Also I just want the SQL commands so it seems inefficient to actually
write to the database.

[web2py] how to implement multi-select list with presets?

2010-12-10 Thread weheh
I'm trying to make an ajax-ed multi-select widget, but I'm having a
brain fart and need some help. My model is something like this:

#model
db.define_table('member',Field('groups','list:string'))
db.define_table('group',Field('name'))

#controller
...
db.member.groups.requires=IS_IN_DB(db,'group.id','%(name)s')
form=SQLFORM.factory(db.member)
...
return dict(form=form)

#view
I want to be able to do something like
{{=form.custom.widget.groups}}

but I want the current member's group assignments to show as pre-set
(already selected) in the multi-select widget. So if all groups are
['a','b','c','d'] and the member group list is ['a','d'] then I expect
a multi-select widget with all options listed but a  d selected.

For some reason (fatigue?) I'm having trouble finding the syntax I
need to accomplish this. Any help out there?


[web2py] Re: doc not showing properly in firefox

2010-12-10 Thread weheh
In case this wasn't obvious, by doc, I mean the web2py online
documentation at web2py.com/book.

On Dec 10, 11:54 pm, weheh richard_gor...@verizon.net wrote:
 Anybody having trouble with not being able to read doc in Firefox?
 Looks OK in Chrome, but Firebug in Firefox throws error:
 NetworkError: 404 Not Found 
 -http://web2py.com/book/static/plugin_wiki/ui/redmond/jquery-ui-1.8.1;
 when trying to access doc index page.


[web2py] Cached View in Development?

2010-12-10 Thread Enchanted
Hi all,

I am developing using web2py under Eclipse, Pydev (GAE projects) in
Windows.
I find that whenever I changed code in controllers or models file, I
can get immediate effect.
However if I try to change code in all views (html file), I have to
restart the dev_appserver.py to see the effect.

Do you have any idea so I don't have to restart it everytime?

Thanks a lot~

[web2py] having trouble with python to json to javascript parameters

2010-12-10 Thread dmm99
Background:
- javascript routine for drawing hierarchical trees (from jit)
- init routine takes data as a json object that works, like this:
script
var tabl = {children: [{children: [{id: node24, name:
2.4}], id: node13, name: 1.3}], id: node02, name:
0.2}
window.onload=function(){
init(tabl);
};
/script

- I need to use data in python, and am trying this conversion
statement:
{{tabl = json({'id': node02,'name': 0.2,'children': [{'id':
node13,'name': 1.3,'children': [{'id': node24,'name':
2.4}] }] }) }}
script
window.onload=function(){
init({{=tabl}});
};
- that does not work, the data are not parsed correctly in the
javascript routine. I noticed that the quotes are encoded, such that
if I put them into an html element, they look like this:

!--h4{{=tabl}}/h4--
looks like:
!--h4{quot;childrenquot;: [{quot;childrenquot;:
[{quot;idquot;: quot;node24quot;, quot;namequot;: quot;
2.4quot;}], quot;idquot;: quot;node13quot;, quot;namequot;:
quot;1.3quot;}], quot;idquot;: quot;node02quot;,
quot;namequot;: quot;0.2quot;}/h4--

I am not sure that is the problem, but it looks like it. I have tried
many ways to de-code the string, but it isn't actually a string. How
do I pass this parameter so javascript will understand it?

Thanks for any help. I can't think of anything more to try.


[web2py] Re: Float field error when using wizard

2010-12-10 Thread Luther Goh Lu Feng
Yes thanks, it has been fixed.

On Dec 11, 6:17 am, mdipierro mdipie...@cs.depaul.edu wrote:
 I think it is fixed now in trunk, please check.

 Massimo

 On Dec 10, 2:15 pm, Luther Goh Lu Feng elf...@yahoo.com wrote:







  I am running the nightly build. I am using sqlite. When creating
  fields in step 3 of the wizard, entering amount float results in the
  following error:

  ==
  Traceback (most recent call last):
    File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/
  restricted.py, line 188, in restricted
      exec ccode in environment
    File /Users/elfgoh/Projects/mustardjuice/web2py/applications/
  mustardjuice/models/db_wizard.py, line 58, in module
      migrate=settings.migrate)
    File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/sql.py, line
  3301, in define_table
      polymodel=polymodel)
    File /Users/elfgoh/Projects/mustardjuice/web2py/gluon/sql.py, line
  441, in create_table
      (field.type, field.name)
  SyntaxError: Field: unknown field type: float for f_amount
  ==

  Replacing the field with amount or amount integer does not cause
  the error. Is this a bug?