[web2py] Re: Catch IntegrityError

2011-01-04 Thread zdzana
Same problem as Cesar. After updating framework earlier capturing by import MySQLdb try: [...] except MySQLdb.IntegrityError [...] stopped working. How do I now catch this exception? Traceback (most recent call last): File "/home/[user]/web2py/applications/[app]/models/ Association

[web2py] Re: DIV Helper and .append

2011-01-04 Thread mdipierro
You can, in fact reproduce the problem here: http://shell.appspot.com/ Google App Engine/1.4.1 Python 2.5.2 (r252:60911, May 12 2010, 14:18:27) [GCC 4.3.1] >>> a=[1,2,3] >>> a.append(4) >>> print a [1, 2, 3] On Jan 5, 1:28 am, mdipierro wrote: > It seems thet any statement that modifies an exis

[web2py] Re: DIV Helper and .append

2011-01-04 Thread mdipierro
It seems thet any statement that modifies an existing object is ignored: In [1] : a=[1,2,3] In [2] : a.append(4) In [3] : print a [1, 2, 3] On Jan 4, 10:08 pm, meentsbk wrote: > Hello, > > First, let me preface this with a "I'm EXTREMELY new to web2py."  I've > been going through the documentati

[web2py] Re: DIV Helper and .append

2011-01-04 Thread mdipierro
You found a bug in the web based shell. Odd because that is the web based shell provided by google as example. I will try debug and submit a patch to them. Massimo On Jan 4, 10:08 pm, meentsbk wrote: > Hello, > > First, let me preface this with a "I'm EXTREMELY new to web2py."  I've > been going

[web2py] DIV Helper and .append

2011-01-04 Thread meentsbk
Hello, First, let me preface this with a "I'm EXTREMELY new to web2py." I've been going through the documentation and trying things in my own example apps, but there is one thing that seems pretty basic that I just can't seem to get working, and that is using the DIV helper with the .append attri

[web2py] Re: downloading a static file without streaming

2011-01-04 Thread Massimo Di Pierro
You should use response.stream. http streaming and downloading are the same thing. The only special thing response.stream does is it allow the server to respond to range requests, when the client asks for partial content of the file. On Jan 4, 2011, at 10:54 PM, Hasanat Kazmi wrote: > Hello, >

[web2py] downloading a static file without streaming

2011-01-04 Thread Hasanat Kazmi
Hello, I have searched a lot and also tried to forge this up but I could not locate or create functionality to download a file from the server; not stream, just normal download. response.download requires a database field and response.stream streams a file, it doesn't simple download it. (I might

[web2py] powerTable plugin - video demonstration

2011-01-04 Thread Bruno Rocha
Video about powerTable on Vimeo (no audio) http://vimeo.com/18447603 -- Bruno Rocha http://about.me/rochacbruno/bio

[web2py] Re: Not open source yet... but

2011-01-04 Thread mikech
I cross posted a thread onto the Tornado Group since I thought this application might be of interest to the readers there. Here is the link: https://groups.google.com/d/topic/python-tornado/MmaQBUx4tyg/discussion. I hope that the discussion here promotes some interest in that group as well.

Re: [web2py] Error form

2011-01-04 Thread Bruno Rocha
lazyT is used for internationalisation, are you using T() somewhere in your code? Helps if you share your app or show us your code for model and controller - put the code here - - put the code here - 2011/1/4 contatogilson...@gmail.com > I make a relationship one-to-many in the following

Re: [web2py] Re: How passwords are encrypted/hashed for storage in web2py

2011-01-04 Thread David Bain
Reading the code in gluon/validators > class CRYPT(). It looks like the default approach is hmac using md5 as the algorithm. Below is a tiny snippet of code that will generate password hashes that match the current default behaviour of the web2py admin application: note: by default the hmac_key i

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
You can just disable require verification since, you will be approving accounts manually. You can also disable change_passord and no email needs to be sent my the system If they need to reset password they can contact you and can do it via admin/appadmin Massimo On Jan 4, 8:07 pm, David Bain w

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
I think janrain might work for me. On Tue, Jan 4, 2011 at 8:06 PM, mdipierro wrote: > you are right... You can use janrain. You just need to configure admin/ > models/db.py but mind you loose the configuration on web2py upgrade. > > On Jan 4, 5:23 pm, David Bain wrote: >> Wouldn't postfix still

[web2py] Re: How passwords are encrypted/hashed for storage in web2py

2011-01-04 Thread mdipierro
good point. yes. On Jan 4, 7:13 pm, David Bain wrote: > So if I'm importing a csv of users into auth_user.password I'd need to > use the same hmac_key to generate the passwords used in the source > csv. > > On Tue, Jan 4, 2011 at 8:10 PM, mdipierro wrote: > > > using a salt (token in your exampl

[web2py] Error form

2011-01-04 Thread contatogilson...@gmail.com
I make a relationship one-to-many in the following way: Table 01: Customers; Table 02: officials; Table 03: Agenda Customers -> agenda and staff -> agenda In the form has a combobox fields of customers and employees, but when After registration the following error occurs: TypeError: 'lazyT' obj

Re: [web2py] Re: How passwords are encrypted/hashed for storage in web2py

2011-01-04 Thread David Bain
So if I'm importing a csv of users into auth_user.password I'd need to use the same hmac_key to generate the passwords used in the source csv. On Tue, Jan 4, 2011 at 8:10 PM, mdipierro wrote: > > using a salt (token in your example) is a bit primitive and vulnerable > to cetrain attacks. > > Web2

[web2py] Re: How passwords are encrypted/hashed for storage in web2py

2011-01-04 Thread mdipierro
using a salt (token in your example) is a bit primitive and vulnerable to cetrain attacks. Web2py uses hmac+md5 or hmac+sha512. The password can be specified by: auth.settings.hmac_kay='sha512:mypassword' which is passed to the validator CRYPT(hmac_key='') Massimo The prefix: (sha5

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread mdipierro
No it would not because ? is not allowed in args. On Jan 4, 5:58 pm, blackthorne wrote: > there I'm just giving you counter-examples that may break that > notation. > On your second question, the / on the right of = would be an argument > 'a' with '/Computer /option' just without quotes as they a

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
you are right... You can use janrain. You just need to configure admin/ models/db.py but mind you loose the configuration on web2py upgrade. On Jan 4, 5:23 pm, David Bain wrote: > Wouldn't postfix still need the outgoing smtp port to be open in order to > send emails? > > The diagram below shows

Re: [web2py] why not PHP?

2011-01-04 Thread Kuba Kucharski
> Comments below the original post for full explanation. ok, I thought there is smth more there that I missed ;)

Re: [web2py] Re: Memory leak - followup

2011-01-04 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Let' move this discussion to web2py-developers. If you are not already > there, please join. OK, the discussion continues there: http://groups.google.com/group/web2py-developers/t/136534ec35b48af8 and this is relevant issue: https://code.google.c

[web2py] How passwords are encrypted/hashed for storage in web2py

2011-01-04 Thread David Bain
I'm not sure how passwords are hashed in web2py. If it uses a token, where is it stored. I'm guessing that it uses something like this: from hashlib import md5 token = 'insecure' tokenizedHash = md5(password + token) print tokenizedHash.hexdigest()

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread blackthorne
there I'm just giving you counter-examples that may break that notation. On your second question, the / on the right of = would be an argument 'a' with '/Computer /option' just without quotes as they are optional. Making a regular expression for that seems very hard, a real parser would be required

Re: [web2py] why not PHP?

2011-01-04 Thread Branko Vukelić
On Tue, Jan 4, 2011 at 10:08 PM, Kuba Kucharski wrote: > 2011/1/4 Branko Vukelić : >> Look at the comments below the post. > > ? Comments below the original post for full explanation. -- Branko Vukelic stu...@brankovukelic.com http://www.brankovukelic.com/

[web2py] Re: onlinestatus

2011-01-04 Thread pk
perfect. can you inform me massimo? On 4 Jan., 23:56, mdipierro wrote: > There is a way add this functionality to gluon/contrib/comer_server.py > which is going to be more reliable (exact!) and faster (no db > access!). > > I will add it in the next few days. > > Massimo > > On Jan 4, 4:46 pm, pk

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
If it is a linux box, you can use postfix or other local mail server. On Jan 4, 5:00 pm, David Bain wrote: > BTW... regarding using a different notification solution for validation, is > that built in or will I need to "roll my own"? I can't use an smtp solution > because of blocked ports, so I'l

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
BTW... regarding using a different notification solution for validation, is that built in or will I need to "roll my own"? I can't use an smtp solution because of blocked ports, so I'll need to send the information over http/https to some server that will send the validation information. On Tue, J

[web2py] Re: onlinestatus

2011-01-04 Thread mdipierro
There is a way add this functionality to gluon/contrib/comer_server.py which is going to be more reliable (exact!) and faster (no db access!). I will add it in the next few days. Massimo On Jan 4, 4:46 pm, pk wrote: > @auth.requires_login() > def keepalive(): >     import time >     db(db.onlin

[web2py] Re: onlinestatus

2011-01-04 Thread pk
@auth.requires_login() def keepalive(): import time db(db.online.id>0).delete() #evtl. weglassen if auth.user.id: if db(db.online.user_id==auth.user.id).count()==0: db.online.insert(user_id=auth.user.id,last_visit=time.time()) else: db(db.online.user_id==auth.user.id

Re: [web2py] Temporary changing default values of a Form

2011-01-04 Thread Kenneth Lundström
There is atleast two other ways of doing this in the controller on-the-fly. Before you create the FORM object you can do: db.table.field.default = 0 (you temporarly change what you have defined i models) or after you have created the FORM but before if form.accepts form.vars.field = somethin

[web2py] Re: Temporary changing default values of a Form

2011-01-04 Thread mdipierro
Excellent question: db.mytable.myfield.default = request.args(0) form = SQLFORM(db.mytable) On Jan 4, 4:28 pm, Fabiano - deStilaDo wrote: > Hi, > > I have a default value for a field defined on the table definition, > along with its validators. > > I want to create a form with a different initi

[web2py] Temporary changing default values of a Form

2011-01-04 Thread Fabiano - deStilaDo
Hi, I have a default value for a field defined on the table definition, along with its validators. I want to create a form with a different initial value for some fields, based on the link the user clicked. Something like "add new item for this category" and the new item form come with that categ

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread mdipierro
I do not understand the notation you propose. Are you suggesting a= to specify args? Why the / on the right of =? On Jan 4, 3:55 pm, blackthorne wrote: > what if? >   menu item             path               possible arg > /Computer_option     /path/function?a=/Computer /option > /Computer /optio

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
never mind. should now be fixed in trunk. On Jan 4, 4:05 pm, David Bain wrote: > I didn't get much out of commenting out those lines. In Chrome I got an > unresolvable url. > > On Tue, Jan 4, 2011 at 4:47 PM, mdipierro wrote: > > I think this is now fixed. > > > On Jan 4, 1:10 pm, David Bain wr

[web2py] BETA 2: new routing facility

2011-01-04 Thread Jonathan Lundell
The second beta of the new routing logic is in the trunk. The example file isn't quite up to date as I write, but it will be shortly. The text below is taken from it. The underlying logic hasn't changed significantly, but the format of the routes.py file is new. You now specify routers, a dict

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
I didn't get much out of commenting out those lines. In Chrome I got an unresolvable url. On Tue, Jan 4, 2011 at 4:47 PM, mdipierro wrote: > I think this is now fixed. > > On Jan 4, 1:10 pm, David Bain wrote: > > When I try to access /admin/appadmin in Multiuser/Teaching mode. > > I get an erro

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread blackthorne
what if? menu item path possible arg /Computer_option /path/function?a=/Computer /option /Computer /option /path/function?a='/Computer /option' /Computer_option page:computer I'm complicating, I know but I'm sure that could find more realistic examples t

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
I think this is now fixed. On Jan 4, 1:10 pm, David Bain wrote: > When I try to access /admin/appadmin in Multiuser/Teaching mode. > I get an error. > > see traceback below: > > Traceback (most recent call last): >   File "/home/user/web2pytrunkagain/gluon/restricted.py", line 188, in > restricte

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread mdipierro
I mean page_name /controller/action/arg1/arg2?a='Hello Computer'&b=5 page_name /controller/action/arg1/arg2?a=Hello+Computer&b=5 Should be equivalent. So the code should: 0) If path starts with / 1) use regex to find "'(?P.*(? wrote: > sure, I'm just not sure what you mean with optional quotes. >

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread blackthorne
sure, I'm just not sure what you mean with optional quotes. e.g.: page_name /controller/action/arg1/arg2?a='Welcome page2' /Computers /controller/action/arg1/arg2?a=Hello Computer should become: page_name -> /controller/action/arg1/arg2?a='Welcome page2' /Computers -> /controller/action/arg1/arg2

[web2py] Excessive memory usage when caching Objects - followup

2011-01-04 Thread mdipierro
I changed the title because it is not technically a leak. A leak is when memory is allocated but not referenced and therefore the amount of memory grows with time. In this case - when cache.ram is used to cache an object - reloading the url does not cause additional memory loss which means the ca

Re: [web2py] why not PHP?

2011-01-04 Thread Kuba Kucharski
2011/1/4 Branko Vukelić : > Look at the comments below the post. ?

Re: [web2py] Re: Memory leak - followup

2011-01-04 Thread Michele Comitini
David, please open a ticket here also: https://code.google.com/p/web2py/issues/entry 2011/1/4 mdipierro : > This is odd. I can reproduce the problem. What is even stranger is > that if I call blahstuff once the count doubles from 24 to 48 but if I > blahstuff more than once (even if with lower c

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
Can you try comment these two lines in gluon/fileutils.py if request.application == other_application: raise KeyError Does this fix the problem? Massimo On Jan 4, 1:10 pm, David Bain wrote: > When I try to access /admin/appadmin in Multiuser/Teaching mode. > I get an error. > > see

[web2py] Re: 1.79.2 -> 1.91.6 migration error (SQL Server BIT field seems to break)

2011-01-04 Thread mdipierro
I am going to need your help debugging this. Can you edit gluon/dal.py and replace value = 'N'+value with value = 'N'+value.encode('utf8') Does the problem go away? If not, can you print tntdb((tntdb.Employees.networkUsername == username) & (tntdb.Employees.isManager == True))._select() Massi

[web2py] Re: Memory leak - followup

2011-01-04 Thread mdipierro
This is odd. I can reproduce the problem. What is even stranger is that if I call blahstuff once the count doubles from 24 to 48 but if I blahstuff more than once (even if with lower cache time) it does not increase the counter more than 48. I also tried caching a lambda:repr(Blah()) as opposed to

Re: [web2py] Re: onlinestatus

2011-01-04 Thread Richard Vézina
Ok and how do you fill up this table? By the way SQLField is deprecated... Use Field() instead. Richard On Tue, Jan 4, 2011 at 2:43 PM, pk wrote: > # > ## Tabelle Onlineuser > #

Re: [web2py] onlinestatus

2011-01-04 Thread Richard Vézina
On Mon, Jan 3, 2011 at 5:13 PM, pk wrote: > hi together, > > i have a function for the onlineuser: > > usersall=db(db.online.last_visit>time.time()-dt) (db.online.user_id==db.auth_user.id).select(db.auth_user.ALL) > This line should be : db(db.online.user_id==db.auth_user.id).select(db.auth_u

[web2py] Re: web2py+FastCGI

2011-01-04 Thread walter
What permissions should I install? On 4 янв, 16:27, mdipierro wrote: > This may be a permission issue as web2py cannot access the file system > (either looking the wrong folder or unable to read/write). > > On Jan 4, 7:21 am, walter wrote: > > > I have used thehttp://web2pyslices.com/main/slices

[web2py] Re: Another web2py powered site

2011-01-04 Thread nicopresto
> is that a modified version of Instant Press? For our open source scientific programming group (the.hacker.within), I combined of the WordPress Clone and the wiki plugin. Replacing 'Read Full Story' with 'Wiki support materials', e.g. http://hackerwithin.org/thw/plugin_wiki/page/welcome http://

[web2py] Re: onlinestatus

2011-01-04 Thread pk
# ## Tabelle Onlineuser # db.define_table('online', SQLField('user_id',db.auth_user), SQLField('last_visit','integer')) On

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
When I try to access /admin/appadmin in Multiuser/Teaching mode. I get an error. see traceback below: Traceback (most recent call last): File "/home/user/web2pytrunkagain/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/user/web2pytrunkagain/applications

[web2py] Re: 1.79.2 -> 1.91.6 migration error (SQL Server BIT field seems to break)

2011-01-04 Thread Roman Bataev
With mssql2:// it gives another error: Thread-7 2011-01-04 13:34:58,770 ERROR login() Traceback (most recent call last): File "c:\web2py\applications\scandabamc/controllers/default.py", line 129, in login user = _find_user_by_name(request.vars.username) File "c:\web2py\applications\scand

[web2py] Re: How to get field values before form.accepts(...)

2011-01-04 Thread annet
Massimo, > Perhaps ('#kvk_number') should be ('input[name=kvk_number]') and > ('#subdossiernumber') should be ('input[name=subdossiernumber]') Yes, problem solved! Thanks. > instead of: > form[0][2][2].insert(0,...) > use: > form.element('#table_field__row TD.w2p_fc').insert(0,...) > Not sure i

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
@mdpierro, More flags in 0.py would be "good enough (tm)" for my use case. On Tue, Jan 4, 2011 at 1:01 PM, mdipierro wrote: > > > On Jan 4, 11:07 am, David Bain wrote: > > Possible bug: > > The teacher account is fine. However I created my first student account > and > > was unable to log in wi

Re: [web2py] Re: Memory leak - followup

2011-01-04 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi :) You may check the issue even with the default simple application created by web admin. Simply add this to the default controller: class Blah(): def __init__(self): pass def blahstuff(): p = cache.ram('blahblah',Blah,time_expire

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
On Jan 4, 11:07 am, David Bain wrote: > Possible bug: > The teacher account is fine. However I created my first student account and > was unable to log in with the credentials. > > Here's my checklist of nice to have features > -- > >  

[web2py] Re: How to get field values before form.accepts(...) [digression]

2011-01-04 Thread mdipierro
yes. instead of form[0][2][2].insert(0,...) use form.element('#table_field__row TD.w2p_fc').insert(0,...) Not sure it is easier in this case. table_field__row is the id of the row for table.field w2p_fc is the class name of the comment column. Massimo On Jan 4, 11:32 am, Jonathan Lu

[web2py] Re: How to get field values before form.accepts(...)

2011-01-04 Thread mdipierro
How does the generated form look like. Perhaps ('#kvk_number') should be ('input[name=kvk_number]') and ('#subdossiernumber') should be ('input[name=subdossiernumber]') On Jan 4, 9:19 am, annet wrote: > Massimo, > > Thanks for your reply. I tried: > > form[0][2][2].insert(0,A('already in > da

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread mdipierro
I think we can go this way: page_name /controller/action/arg1/arg2?a='Welcome page2' but I would make so that the quotes optional (if provided content will be replaced by urllib.quote(content). Would you send me a revised patch? On Jan 4, 11:21 am, blackthorne wrote: > Well, I see your v

Re: [web2py] Re: How to get field values before form.accepts(...) [digression]

2011-01-04 Thread Jonathan Lundell
On Jan 4, 2011, at 8:26 AM, mdipierro wrote: > > We have that > > form.element(...) > form.elements(...) > > both take jQuery syntax. So the construction below can be expressed that way? > > Massimo > > On Jan 4, 10:13 am, Jonathan Lundell wrote: >> On Jan 4, 2011, at 7:19 AM, annet wrote:

[web2py] Re: suggestion/feature request: multiple view support per each controller function

2011-01-04 Thread VP
Upon thinking about this, I think your solution will address the base layout, from which each view extends. Right? What I want is that there are different views for (for instance) each function + Index: view/default/index.html, view/default/index.ipad.html, view/ default/index.mobile.html + Sh

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Okay the register button is now present :) [image: user login-1.jpg] On Tue, Jan 4, 2011 at 12:17 PM, VP wrote: > Okay. Thanks. > > On Jan 4, 11:13 am, David Bain wrote: > > VP, > > No the password is the password that the first user signs up with. > > > > On Tue, Jan 4, 2011 at 12:10 PM, VP w

Re: [web2py] why not PHP?

2011-01-04 Thread Branko Vukelić
Look at the comments below the post. On Tue, Jan 4, 2011 at 5:46 PM, Martín Mulone wrote: > Nice bug > > 2011/1/4 Jason (spot) Brower >> >> Wow, I like that one. :P >> >> On Tue, Jan 4, 2011 at 6:35 PM, mdipierro wrote: >>> >>> among other reasons because you can bring down the server just by >

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread blackthorne
Well, I see your view. In some cases, you can just use %20 instead of white space but not if that is part of the argument. example: http://prernalal.com/banned%20books/ == http://prernalal.com/banned books/ - valid http://example.com/?page="banned%20books"; != http://example.com/?page="banned book

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread VP
Okay. Thanks. On Jan 4, 11:13 am, David Bain wrote: > VP, > No the password is the password that the first user signs up with. > > On Tue, Jan 4, 2011 at 12:10 PM, VP wrote: > > > >> One more caveat. For security, the first user is the teacher and > > registration is enabled by default. > > > I

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
I'm wondering about the authentication issue. I'm working behind a firewall which blocks port 587 (used to communicate with gmail), which I'd like to use as my smtp server. I think for my use case I have two options: 1. Host the server in front of the firewall 2. Host the email sending cod

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
VP, No the password is the password that the first user signs up with. On Tue, Jan 4, 2011 at 12:10 PM, VP wrote: > > >> One more caveat. For security, the first user is the teacher and > registration is enabled by default. > > I haven't tried this, but will soon. One question: Would the passwo

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread VP
>> One more caveat. For security, the first user is the teacher and >> registration is enabled by default. I haven't tried this, but will soon. One question: Would the password of the first user be the same as the password given to web2py? Thanks.

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
I missed the part about verification. That's probably the issue. On Tue, Jan 4, 2011 at 11:56 AM, mdipierro wrote: > Oops. I missed a file in the commit. adding it now. > > One more caveat. For security, the first user is the teacher and > registration is enabled by default. > For all other use

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Possible bug: The teacher account is fine. However I created my first student account and was unable to log in with the credentials. Here's my checklist of nice to have features -- - Bulk import of users from a csv - by default pr

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread mdipierro
This is a big can of worms... Do we really need to pass vars? On Jan 4, 10:45 am, blackthorne wrote: > sorry, I was considering on using the same code to the wiki pages in > the markmin syntax so that you could also make this kind of links in > wiki pages. > [[namehttp://example.com, args=[], var

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
It would be nice to have some documentation. For now even a simple blog post that explains purpose, how to, and shows some screen shots will do. Massimo On Jan 4, 10:44 am, David Bain wrote: > Massimo, > Nice! It works... so as long as I register first I'm the teacher :). > I'm just looking at w

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Okay... I've started hacking the "Teaching version" of web2py. Hardcoded my own twitter feed. I think it would be nice to offer custom feeds on the admin page: see screenshot below: [image: site.jpg] On Tue, Jan 4, 2011 at 11:47 AM, Bruno Rocha wrote: > Thanks! this will ne very usefull for me t

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
Oops. I missed a file in the commit. adding it now. One more caveat. For security, the first user is the teacher and registration is enabled by default. For all other users of admin (students) registration requires verification. That means the teacher must login, user /admin/appadmin and clear the

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Just a note. There was no option to register. I had to visit localhost:8000/admin/default/user/register On Tue, Jan 4, 2011 at 11:44 AM, David Bain wrote: > Massimo, > Nice! It works... so as long as I register first I'm the teacher :). > I'm just looking at web2py again in the last few weeks.

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread Bruno Rocha
Thanks! this will ne very usefull for me too. 2011/1/4 mdipierro > In trunk. > > - Deploy the latest admin > - edit file applications/admin/models/0.py and set > MULTI_USER_MODE = True > -- Bruno Rocha http://about.me/rochacbruno/bio

Re: [web2py] why not PHP?

2011-01-04 Thread Martín Mulone
Nice bug 2011/1/4 Jason (spot) Brower > Wow, I like that one. :P > > > On Tue, Jan 4, 2011 at 6:35 PM, mdipierro wrote: > >> among other reasons because you can bring down the server just by >> typing >> >> 2.2250738585072011e-308 >> >> in a web form integer value. (exploit requires 32bits ma

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread blackthorne
sorry, I was considering on using the same code to the wiki pages in the markmin syntax so that you could also make this kind of links in wiki pages. [[name http://example.com, args=[], vars={}]] Other thing, you might want to consider... check your example page_name /controller/action/arg1/arg2?a

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Massimo, Nice! It works... so as long as I register first I'm the teacher :). I'm just looking at web2py again in the last few weeks. I'm very happy to help with documentation of this feature. Just point me in the right direction. see: Screenshot below: [image: user login.jpg] On Tue, Jan 4, 2011

[web2py] TAKE 2: Web2py + (jython / modjy) + Tomcat 6

2011-01-04 Thread Andrew
Hi All, I picked this effort up again and wanted to see if anyone else has had success with a scenario like this. I had tried a while back but Jython and modjy was still maturing and ran into some platform issues. First off, here are the components I'm using: * Windows XP SP3 * Tomcat 6.0.29 * S

[web2py] change to parameter name in latest version?

2011-01-04 Thread apple
Latest upgrade to web2py appears to have changed the name for parameters in a background process. Yesterday I was running a background process using subprocess.Popen("c:/python27/python %s/web2py.py -S scraper -M -N -R %s" \ %(os.getcwd(), os.getcwd()+"/ap

Re: [web2py] why not PHP?

2011-01-04 Thread Jason (spot) Brower
Wow, I like that one. :P On Tue, Jan 4, 2011 at 6:35 PM, mdipierro wrote: > among other reasons because you can bring down the server just by > typing > > 2.2250738585072011e-308 > > in a web form integer value. (exploit requires 32bits machine). > > Source: > > http://www.exploringbinary.com/

[web2py] why not PHP?

2011-01-04 Thread mdipierro
among other reasons because you can bring down the server just by typing 2.2250738585072011e-308 in a web form integer value. (exploit requires 32bits machine). Source: http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/

Re: [web2py] Google Summer of Code

2011-01-04 Thread Jason (spot) Brower
Building a testing platform would be spectacular! We really need something to test all the features of web2py. I would also love to see a system that can monitor visits and other things like apache does. Best Regards, Jason On Tue, Jan 4, 2011 at 3:56 PM, James Hancock wrote: > I get back to th

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread mdipierro
Are we still talking about menu links? Why should a menu item perform a post? On Jan 4, 10:31 am, blackthorne wrote: > fine with me > > any solution for POST method? > > On Jan 4, 4:25 pm, mdipierro wrote: > > > I have no objection to local URL.  but the author of the menu may not > > be the adm

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread blackthorne
fine with me any solution for POST method? On Jan 4, 4:25 pm, mdipierro wrote: > I have no objection to local URL.  but the author of the menu may not > be the administrator therefore we cannot eval(...) text in the meta- > menu. This poses restrictions on what we can put in there. I suggest >

[web2py] Re: How to get field values before form.accepts(...) [digression]

2011-01-04 Thread mdipierro
We have that form.element(...) form.elements(...) both take jQuery syntax. Massimo On Jan 4, 10:13 am, Jonathan Lundell wrote: > On Jan 4, 2011, at 7:19 AM, annet wrote: > > > > > Thanks for your reply. I tried: > > > form[0][2][2].insert(0,A('already in > > database?',_onmouseover="this.style

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread mdipierro
I have no objection to local URL. but the author of the menu may not be the administrator therefore we cannot eval(...) text in the meta- menu. This poses restrictions on what we can put in there. I suggest we just allow page_name /controller/action/arg1/arg2?a=b and if this starts with / this i

Re: [web2py] Re: How to get field values before form.accepts(...) [digression]

2011-01-04 Thread Jonathan Lundell
On Jan 4, 2011, at 7:19 AM, annet wrote: > > Thanks for your reply. I tried: > > form[0][2][2].insert(0,A('already in > database?',_onmouseover="this.style.cursor='pointer';",_onclick="javascript:details('%s/'+ > $('#kvk_number').val()+'/'+$ > ('#subdossiernumber').val())"%URL(r=request,f='retrie

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread blackthorne
no local urls for secure mode... yes/no? On Jan 4, 3:51 pm, mdipierro wrote: > There cannot be eval in there. The plugin may be in level=1 (secure > mode). > > On Jan 4, 8:38 am, blackthorne wrote: > > > > > Broken here: > > In [21]: url="\'f\',args=[\'x\',\'y\'],vars=dict(z=\'t\')" > > > In [22

Re: [web2py] User Login

2011-01-04 Thread contatogilson...@gmail.com
Thank you. _ *Gilson Filho* *Desenvolvedor Web Blog:* gilson-filho.blogspot.com *Twitter:* twitter.com/gilsonfilho 2011/1/4 Bruno Rocha > {{=session.auth.user.first_name}} > {{=session.auth.user.last_name}} > > session > auth : > expiration : > 3

Re: [web2py] User Login

2011-01-04 Thread Bruno Rocha
{{=session.auth.user.first_name}} {{=session.auth.user.last_name}} session auth: expiration: 3600 last_visit: datetime.datetime(2011, 1, 4, 14, 0, 42, 458812) user: email: rochacbr...@gmail.com first_name: bruno id: 1 last_name: rocha password: xxx registration_key: reset_password_key

[web2py] Re: Memory leak - followup

2011-01-04 Thread mdipierro
can you show us the guppy stats before and after caching? without caching any db object? can you also email me the entire app code? On Jan 4, 9:15 am, David Zejda wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Whenever in controller/model is the class declared, the same result. > >

Re: [web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread David Bain
Thanks Massimo, Checking out trunk now. On Tue, Jan 4, 2011 at 10:49 AM, mdipierro wrote: > In trunk. > > - Deploy the latest admin > - edit file applications/admin/models/0.py and set > MULTI_USER_MODE = True > - Try access admin and it will require registration/login > - The first user to re

[web2py] User Login

2011-01-04 Thread contatogilson...@gmail.com
How can I capture the name of the user logged in and put in the view, without links to Login, and Register Lose Password? _ *Gilson Filho* *Desenvolvedor Web Blog:* gilson-filho.blogspot.com *Twitter:* twitter.com/gilsonfilho

[web2py] Re: patch for URL() in meta-menu (plugin_wiki)

2011-01-04 Thread mdipierro
There cannot be eval in there. The plugin may be in level=1 (secure mode). On Jan 4, 8:38 am, blackthorne wrote: > Broken here: > In [21]: url="\'f\',args=[\'x\',\'y\'],vars=dict(z=\'t\')" > > In [22]: [part.strip('\'').strip('\"') for part in url[4:].split(',')] > Out[22]: ["args=['x", "y']", "v

[web2py] Re: Setting up a dedicated web2py server that supports multiple users, separate folders

2011-01-04 Thread mdipierro
In trunk. - Deploy the latest admin - edit file applications/admin/models/0.py and set MULTI_USER_MODE = True - Try access admin and it will require registration/login - The first user to register is teacher (can see all apps) - All other users are students (can only see/edit/create their own ap

[web2py] Fwd: [python.pt] [Fwd: Python Developer Role - contract]

2011-01-04 Thread António Ramos
Hi Marco, I’m currently looking for a Python Developer with knowledge of C++ for leading financial institution. They need developers with excellent Python and strong knowledge of C++ development. The role will involve working on a complex trading system and will require candidates to create and

Re: [web2py] onlinestatus

2011-01-04 Thread Richard Vézina
The model are missing for db.online Richard On Mon, Jan 3, 2011 at 5:13 PM, pk wrote: > hi together, > > i have a function for the onlineuser: > > usersall=db(db.online.last_visit>time.time()-dt) > (db.online.user_id==db.auth_user.id).select(db.auth_user.ALL) > return TABLE(*[TD(user.user_name)

  1   2   >