[web2py] Re: calling secured function from cron

2010-06-29 Thread mika
I have following line in crontab: * * * * * root *cpe_lang/test_only the function in controller is defined as: @auth.requires( (request.client==None) or (auth.has_membership('managers')) ) def test_only(): logging.error('Test cron') logging.info(str(request)) if request.

[web2py] Issues with sessions on multiple tabs/windows

2010-06-29 Thread Jason Brower
I have a robot that is running on web2py. It has it's main operating screen and a screen specifically for debugging and other information. I have the main screen that pulls a page that reports the very general status information, and when that screen is requested about 20 different session variab

Re: [web2py] do you use web2py for teaching?

2010-06-29 Thread Mariano Reingart
On Mon, Jun 28, 2010 at 7:22 PM, mdipierro wrote: > Please post some info about the class or drop me a private note. We're teaching web2py for the final year Computer Science (BSc) project (since 2009): http://reingart.blogspot.com/p/materia-edi-3.html Also I taught web2py at: * Programming in

[web2py] Re: calling secured function from cron

2010-06-29 Thread mdipierro
Please add a logging.info(str(request.client)) Outside the function, in a model. On 29 Giu, 04:41, mika wrote: > I have following line in crontab: > * * * * *               root *cpe_lang/test_only > > the function in controller is defined as: > > @auth.requires( (request.client==None) or >

[web2py] Re: Issues with sessions on multiple tabs/windows

2010-06-29 Thread mdipierro
I cannot say without more details. Just consider that if you have two windows open they share the same session variables. On 29 Giu, 04:46, Jason Brower wrote: > I have a robot that is running on web2py.  It has it's main operating > screen and a screen specifically for debugging and other inform

[web2py] Re: synchronize tables in two databases

2010-06-29 Thread rochacbruno
I found a person who wants the same http://www.freelancer.com/projects/pingfreelance_566941.html This person is willing to pay for development of a tool to generate the reverse schema, from Database for Web2py. May be a good chance for any experienced web2py programmer develop and then release to

[web2py] Re: synchronize tables in two databases

2010-06-29 Thread mdipierro
http://groups.google.com/group/web2py/browse_thread/thread/c347e86a6644432a/c1c7126c1b14600d?lnk=gst&q=Script+to+generate+schema#c1c7126c1b14600d On 29 Giu, 07:42, rochacbruno wrote: > I found a person who wants the same > > http://www.freelancer.com/projects/pingfreelance_566941.html > > This pe

[web2py] Re: do you use web2py for teaching?

2010-06-29 Thread rochacbruno
I understood that your question was referring to the use of web2py as a tool for teaching programming and web development (In educational institutions,, Universities etc). In these cases I never used, but... I Also did some private classes, and right now I am training 5 IT professionals of São Pau

[web2py] Re: Anybody having trouble accessing web2py google group on mozilla firefox 3.6.6?

2010-06-29 Thread Richard
thanks for tip - I also faced the same problem with FF when on Windows. On Jun 29, 2:34 am, Thadeus Burgess wrote: > try logging completely out of your google account, clearing firefox > cookies, closing firefox, then start again. > -- > Thadeus > > > > On Mon, Jun 28, 2010 at 10:32 AM, weheh w

[web2py] Web2py Application Exhibition Part 2

2010-06-29 Thread NetAdmin
Web2py Application Exhibition Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc.

[web2py] web2py with AppStats

2010-06-29 Thread PanosJee
if you are on GAE it s to have AppStats on it s quite easy http://blog.socialcaddy.com/appstats-for-web2py-0

Re: [web2py] Re: elFinder-web2py , Filemanager for Web2py!

2010-06-29 Thread Phyo Arkar
Let me know where it dont work. I am suprised too :D may be for security issues? On Fri, Jun 25, 2010 at 4:30 PM, Giuseppe Luca Scrofani wrote: > Even following your indication I can't make it work :( I will retry > after dinner. I am surprised of how this project seems not interesting > to the

[web2py] models for auth system

2010-06-29 Thread Jean-Guy
Hello, Where can I find the models of auth tables? Are they stored somewhere in the web2py tree? Jonhy

[web2py] format of fk field

2010-06-29 Thread Jean-Guy
Hello, I know there is a way to show an other field value of the same row for a fk field. Is that correct? How to do it? This work in case of m2m table : If you check in appadmin in membership table the group_id are replaced by the role of the auth_group table... I there a way to do the sam

[web2py] Re: models for auth system

2010-06-29 Thread Chris S
Gluon/tools.py You'll find the Auth class in there. In auth is defin_tables() where you'll see the default tables. You'll notice it only defines the defualts if you haven't specified a custom table in it's place. That's where I looked to figure out how to define custom fields in the Auth table.

[web2py] sql.py error?

2010-06-29 Thread Chris S
I think the most recent update to trunk I've found a spot in sql.py where functionality is different though it might be intended. In the last stable release you could make a call: auth.add_permission(group.id,'name','table_name') You could do this with out first checking for it's existence alread

Re: [web2py] Re: models for auth system

2010-06-29 Thread Jean-Guy
On 2010-06-29 14:30, Chris S wrote: that's what you're looking for. Yes! Thank Chris.

[web2py] Re: sql.py error?

2010-06-29 Thread Chris S
Actually, that's not exactly what's happening. The error is produced when trying to make two calls back to back to auth.add_permission(). Single calls still create duplicate enteries but back to back calls error on the 2nd call never creating an entry. To reproduce: def test(): auth.add_permi

[web2py] Re: sql.py error?

2010-06-29 Thread Chris S
Crap that should read: To reproduce: def test(): auth.add_permission(id,'name','table1') auth.add_permission(id,'name','table2') return I'm trying to assign two different permissions to the same group in a single function to get the error. On Jun 29, 2:11 pm, Chris S wrote: > Actually,

[web2py] web2py security - keep it up!

2010-06-29 Thread Craig Younkins
Hello there! My name is Craig Younkins. I'm a summer intern at OWASP, the Open Web Application Security Project. This summer I'm working heavily on web security in Python. First, I would like to praise Dr. Di Pierro and all the web2py contributors for their focus on security. Examining the OWASP T

[web2py] Re: sql.py error?

2010-06-29 Thread Yarko Tymciurak
can you give a complete example necessary to reproduce? Alternatively, you can debug yourself: set a breakpoint at gluon/ tools.py::Auth:add_permission() and analyze what's going on... - Yarko On Jun 29, 2:13 pm, Chris S wrote: > Crap that should read: > > To reproduce: > def test(): >     au

[web2py] Re: sql.py error?

2010-06-29 Thread Chris S
I'm actually not sure how to set break points. I'm using Eclipse so I'm sure there's a way but while I'm educating myself. Here's all you should need to know if the above isn't descriptive enough. In db.py: auth = Auth(globals(),db) # authentication/authorization auth.define_tables()

[web2py] built in web2py datepicker bug with Google Chrome

2010-06-29 Thread Jean-Guy
Hello, Is there other user that are having datepicker coming blank when changing the year or mouth couples of time with Google Chrome? I test it with firefox no problem. I use web2py 1.7.8 Jonhy

[web2py] Re: sql.py error?

2010-06-29 Thread Chris S
Narrowing it down. I forgot to mention I'm running on the GAE development server right now. So the above error is likely with gql.py not sql.py. I've reverted my copy of gql.py to 631:1f7ae1da46ff and the error is now gone. The problem is with Line Number 279: Original - tmp = self._ta

Re: [web2py] facebook oauth support

2010-06-29 Thread Kuba Kucharski
hi, MCM the web2py community is very much interested in facebook graphApi intergration with web2py, can you make it plugin/model? I use some graph api calls in my applications but it is simple token exchange, no integration with app. but I know the subject, maybe I can help. thx for all your effo

[web2py] Re: facebook oauth support

2010-06-29 Thread howesc
there is also this: http://web2pyslices.com/main/slices/take_slice/77 still not a plugin exactly, but it supports multiple authentication types. On Jun 29, 2:13 pm, Kuba Kucharski wrote: > hi, MCM > > the web2py community is very much interested in facebook graphApi > intergration with web2py, c

Re: [web2py] Re: facebook oauth support

2010-06-29 Thread Kuba Kucharski
hey, howesc If you could provide working application package w/o facebook keys of course it would be neat because I did not manage to get your slice fully working. -- Kuba

[web2py] Re: web2py security - keep it up!

2010-06-29 Thread mdipierro
WOW. Thank you. I tried fill the blank but I need to read it again tomorrow. Massimo On 29 Giu, 11:08, Craig Younkins wrote: > Hello there! My name is Craig Younkins. I'm a summer intern at OWASP, > the Open Web Application Security Project. This summer I'm working > heavily on web security in P

Re: [web2py] Re: facebook oauth support

2010-06-29 Thread Kuba Kucharski
ok, maybe howesc!=cfhowes, sory ;) I thought it is yours. -- Kuba

[web2py] Re: Problem trying to insert an image with CKEditor and SQLFORM

2010-06-29 Thread MikeEllis
This one still has me stumped so I'm taking the liberty of adding some more info to make it current in the discussions. As I noted in the earlier post, the problem has to to do with CKEditor's image insertion dialog somehow triggering a form submission. This is really puzzling, because the link

[web2py] Re: sql.py error?

2010-06-29 Thread mdipierro
I do not know but I made a change in trunk. Could you please try if it fixes the problem? On 29 Giu, 16:02, Chris S wrote: > Narrowing it down. > > I forgot to mention I'm running on the GAE development server right > now.  So the above error is likely with gql.py not sql.py. > I've reverted my c

[web2py] RE: Problem trying to insert an image with CKEditor and SQLFORM

2010-06-29 Thread MikeEllis
Apologies for new post with same title but adding new info to the old thread doesn't seem to be making it current in the discussions and I'm really stuck trying to understand the problem. Anyway the original post plus some new info I added just is at http://groups.google.com/group/web2py/browse_t

[web2py] Re: GAE / Case sensitivity / canonical validator?

2010-06-29 Thread NickFranceschina
I'm not sure what the "like operator" has to do with this? I guess what I'm talking about is using a validator to actually do the work of an "autocompleted normalized field". Much like the password encryption validator.. or is_lower works... those validators actually change the value of the fiel

[web2py] multiselect plugin from web2py slice

2010-06-29 Thread Jean-Guy
Hello, I install multiselect plugin it works just fine... http://web2pyslices.com/main/slices/take_slice/70 But I receive this error when I try to got on a record from the appadmin : Error traceback Traceback (most recent call last): File "/web2py/gluon/restricted.py", line 178, in restrict

[web2py] Accessing auth_user table

2010-06-29 Thread elfuego1
Hello, On this page: http://web2pyslices.com/main/slices/take_slice/53 I have found a great pice of code which allows to check on the fly if there is an exact value already in database. Oryginal code: def ajaxuserexist(): username = request.vars.values()[0] query = db.users.name.like(us

[web2py] Re: multiselect plugin from web2py slice

2010-06-29 Thread Jean-Guy
Work around that work actually is to define the widget in the controller : move this from model to controller : db.atable.field1.widget=multiselect_widget Jonhy On 2010-06-29 18:29, Jean-Guy wrote: Hello, I install multiselect plugin it works just fine... http://web2pyslices.com/main/slices/

[web2py] Many To Many Select

2010-06-29 Thread Al
Given a many-to-many relationship between table1 and table2 and a row in table1, I am trying to figure out the fastest way to select all the rows in table2 that are associated with the row. (I'm still trying to pick up web2py, so thanks for everyone's patience if I've missed the blatently obvious.)

[web2py] Re: Many To Many Select

2010-06-29 Thread mdipierro
If I understand: for row in db(db.link_table.table1==r.id) (db.table2.id==db.linked_table.table2).select(db.table2.id,db.table2.other): print row.id, row.other if no double links else sub=db(db.link_table.table1==r.id)._select(db.linked_table.table2) for row in db(db.table2.id.belongs(sub)).

[web2py] Re: Sending html emails [bug?]

2010-06-29 Thread Richard
I did some tests with trunk Mail on GAE: mail.send(..., message=message) -> Mail.send failure:May not set empty value for 'html' mail.send(..., message=(None, message)) -> Mail.send failure:May not set empty value for 'body' mail.send(..., message=(message, message)) -> sends email as HTML Rich

[web2py] Re: Sending html emails [bug?]

2010-06-29 Thread Richard
also the reply_to field is ignored On Jun 30, 9:25 am, Richard wrote: > I did some tests with trunk Mail on GAE: > > mail.send(..., message=message) > -> Mail.send failure:May not set empty value for 'html' > > mail.send(..., message=(None, message)) > -> Mail.send failure:May not set empty valu

[web2py] Re: elFinder-web2py , Filemanager for Web2py!

2010-06-29 Thread GoldenTiger
Yes, this project like me, and Massimo said about an Admin version 2 of web2py based at elFinder Look at this http://groups.google.es/group/web2py/browse_thread/thread/ae2e3ef69daef09a/e88c6812af206cc6 So, probably it will be shipped by default in the future :D I am working on integration too :

[web2py] GAE / parents / ancestors in Web2py?

2010-06-29 Thread NickFranceschina
I've been reading and googling and searching... but not sure what the latest, up-to-date information is on this: in GAE "parents" and "references" are two different things. when you create an object in GAE you can, on insert, assign the "parent"... and this puts the new object into the parents "e

[web2py] Re: Many To Many Select

2010-06-29 Thread Al
Ah, belongs() + a clever select SQL. Thanks. Al On Jun 29, 7:04 pm, mdipierro wrote: > If I understand: > > for row in db(db.link_table.table1==r.id) > (db.table2.id==db.linked_table.table2).select(db.table2.id,db.table2.other)­: >     print row.id, row.other > > if no double links else > > sub=

[web2py] Re: web2py security - keep it up!

2010-06-29 Thread Richard
I like the tipfy wiki they use - web2py needs something clean like that. On Jun 30, 7:45 am, mdipierro wrote: > WOW. Thank you. I tried fill the blank but I need to read it again > tomorrow. > > Massimo > > On 29 Giu, 11:08, Craig Younkins wrote: > > > Hello there! My name is Craig Younkins. I'

[web2py] Re: Accessing auth_user table

2010-06-29 Thread Chris S
I don't guess I follow. Isn't that the same as: def userexist(namecheck): if db(db.auth_user.username==namecheck).count() > 0: return 'yes' else: return 'no' So I"m saying your querry should be: query = (db.auth_user.username==username) Hope that helps On Jun 29, 5:34 p

[web2py] Re: sql.py error?

2010-06-29 Thread Chris S
Just updated same thing. Here's the full error log for you. Error Log--- ERROR2010-06-30 04:31:46,888 restricted.py:143] Traceback (most recent call last): File "C:\Users\Chris\Documents\Workspace\WebDev\gluon \restricted.py", line 178, in restric

[web2py] Re: sql.py error?

2010-06-29 Thread Yarko Tymciurak
On Jun 29, 3:27 pm, Chris S wrote: > I'm actually not sure how to set break points.  I'm using Eclipse so > I'm sure there's a way but while I'm educating myself. A bit of an aside, but for completeness: Not sure about Eclipse... maybe this will help: http://pydev.org/manual_adv_debugger.html

[web2py] Which is faster?

2010-06-29 Thread weheh
I have a table 'x' with Field('z'), which is set via a multiselect. The value will be a string like '|1|2|3|5|8|'. These correspond to the ids of another table 'z'. I'm trying to figure out which would be a faster search: 1) use the 'like' operator to match the db.z.id stored in the x.z field or

[web2py] Re: calling secured function from cron

2010-06-29 Thread mika
why should I put there? I have logging function defined in models/log.py. It works correctly, I think. You want request.client? so when I call by hand it gives "127.0.0.1", when it is from Cron it gives "None" but only if function is NOT secured. When it is secured it is not called properly and gi