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

2010-06-30 Thread GoldenTiger
Yes I know this about T3, 3 levels, ok. What i wonder is if two different wiki admins (or users) of two different wiki apps could share data in some way (sessions,files,db...). Since wiki admin/users can write python code editing pages, could users access shared data? Another independient T3 cuest

[web2py] Re: Accessing auth_user table

2010-06-30 Thread mdipierro
\applications\\myapplication/controllers/default.py", line 64, in ajaxuserexist\n File "gluon/sql.py", line 1329, in __getattr__ \nKeyError: \'auth_user\'\n' What is in default.py line 60-70? I think it tells that db.auth_user is not defined. Something is wrong in the models then. On 30 Giu, 1

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

2010-06-30 Thread mdipierro
On 30 Giu, 23:57, GoldenTiger wrote: > I'm still thinking about it. I was raised a small question regarding > the cooperation of applications (page 126 of book). > The applications can share tables, sessions, files, import modules > from other applications, call other's applications actions with

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

2010-06-30 Thread mdipierro
Good to paranoid about security because the worst case scanario will happen with lots of users. :-( Normally the session_id is what keeps the session open and that is why the session should be refreshed after logout. In out case the session_id is only used to retrieve a server side file and this f

[web2py] Re: sql.py error?

2010-06-30 Thread mdipierro
check latest trunk please, this has changed. On 30 Giu, 22:15, dlypka wrote: > For the moment, I suggest you simply remove the stmt: >     self._last_reference = tmp > > I can assure you that it is not needed for any existing applications. > It is intended as a future feature to support native Go

[web2py] Re: facebook oauth test on GAE

2010-06-30 Thread mdipierro
:-) just in time, I need it. On 30 Giu, 20:27, mcm wrote: > Hi, > > You can test the facebook OAuth code on GAE: > > http://grafbook.appspot.com/helloFacebook > > Code of application will be available soon after some cleanup! > > tnx > michele

[web2py] Re: simplejson -- wasn't this resolved?

2010-06-30 Thread mdipierro
Is this supported in 2.4? On 30 Giu, 18:12, zahariash wrote: > Hello. > > Problem with simplejson is that it's originally trying to load c > module (_speedups.so), but web2py version of simplejson is python > only. > So when decoder.py, encoder.py and scanner.py trying to load c modules > find it

[web2py] Re: Anvanced applications in gae

2010-06-30 Thread mdipierro
I think, Field(gae.ReferenceProperty(auth_user,...) should be Field(gae.ReferenceProperty(db.auth_user._tableobj,) On 30 Giu, 16:15, Carles Gonzalez wrote: > Sorry, but I've encontured another error. > > The relevant part of my code is following: > > if request

[web2py] Re: web2py freezing

2010-06-30 Thread mdipierro
Can you check memory usage when it freezes? Is there anything in the db log about too many connections? On 30 Giu, 16:06, Candid wrote: > I am using web2py in my organization for internal applications. One of > the applications uses dedicated instance of web2py (v1.78.1) running > on dedicated ub

[web2py] Re: Accessing auth_user table

2010-06-30 Thread elfuego1
OK. Now I can see an error: POST http://127.0.0.1:8000/myapplication/default/ajaxuserexist 500 INTERNAL SERVER ERROR There is also information about issued ticet but I can't open it in web browser, so I paste it below: (dp1 S'output' p2 S'' sS'layer' p3 S'F:\\Programy\\web2py\\applications\\mya

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

2010-06-30 Thread GoldenTiger
I'm still thinking about it. I was raised a small question regarding the cooperation of applications (page 126 of book). The applications can share tables, sessions, files, import modules from other applications, call other's applications actions with exec_environment ... Is there a way to prevent

[web2py] Re: Caching downloads

2010-06-30 Thread Chris S
Got it. That was driving me nuts. By default the static folder is handled by App.yaml on GAE. But no expiration date was set in the default file provided with web2py. Adding an expiration date causes static files to start properly caching again. I also tested removing the "static" section of ap

[web2py] Re: Caching downloads

2010-06-30 Thread Chris S
Got it. That was driving me nuts. By default the static folder is handled by App.yaml on GAE. But no expiration date was set in the default file provided with web2py. Adding an expiration date causes static files to start properly caching again. I also tested removing the "static" section of ap

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

2010-06-30 Thread GoldenTiger
Hello Troex Welcome to web2py group! Your arrival could not be more timely I am working on elfinder and web2py integration. You are in the right place to be helped with python and websites. This google group is very helpful. I'd like to contribute too. My spoken English is limited to express com

[web2py] Re: sql.py error?

2010-06-30 Thread dlypka
For the moment, I suggest you simply remove the stmt: self._last_reference = tmp I can assure you that it is not needed for any existing applications. It is intended as a future feature to support native Google App Engine code within web2py. _last_reference is a dynamically added attribute to

[web2py] Re: How to enable "request_reset_password" function?

2010-06-30 Thread Richard
http://code.google.com/p/web2py/source/browse/gluon/tools.py At line 1866 of gluon/tools.py you will find: if not self.settings.mailer: response.flash = self.messages.function_disabled return '' which means you will need to enable mail to get this working. Richard On Jun 26, 6:59 am,

[web2py] GAE precompilation

2010-06-30 Thread Richard
http://googleappengine.blogspot.com/2010/06/app-engine-sdk-135-released-with-new.html """ in this release we’ve also added support for precompilation of Python source files to match the same feature we launched for Java last year. For Python, you can now use precompilation to speed up application

[web2py] facebook oauth test on GAE

2010-06-30 Thread mcm
Hi, You can test the facebook OAuth code on GAE: http://grafbook.appspot.com/helloFacebook Code of application will be available soon after some cleanup! tnx michele

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

2010-06-30 Thread GoldenTiger
> I disagree but probably I did not explain this very well. web2py has > two things it calls session. One is the general session managed via > cookie session_id. One is the authentication session stored into the > general session file. When a user logs out the authentication session > information i

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

2010-06-30 Thread Troex Nevelin
I've looked though your code and I like idea to put POST/GET and json outside the connector itself. I'll start contributing your code right now because my main goal for next release is to make python connector usable in frameworks without (if this is possible) modifications. About speed of directo

[web2py] Re: simplejson -- wasn't this resolved?

2010-06-30 Thread zahariash
Hello. Problem with simplejson is that it's originally trying to load c module (_speedups.so), but web2py version of simplejson is python only. So when decoder.py, encoder.py and scanner.py trying to load c modules find it in global namespace...: try: from simplejson._speedups import encode_ba

Re: [web2py] Re: How may I do that

2010-06-30 Thread Jean-Guy
I had to figure (remember my read) out how to call the id in my other function, but I got it to work. Here is my working functions : def atable_create(): if auth.has_membership(auth.id_group('group1')): form=crud.create(db.atable,next='atable_read/[id]',message=T('form accepted'))

Re: [web2py] facebook oauth support

2010-06-30 Thread Michele Comitini
Hi Kuba! The code does only authentication. The graph API is used at the moment to get the "me" node and only that, so that user info from facebook becomes available under auth.user. About the model I think that the usage of the graph API is straightforward and similar to any other graph API or

Re: [web2py] Re: Anvanced applications in gae

2010-06-30 Thread Carles Gonzalez
Sorry, but I've encontured another error. The relevant part of my code is following: if request.env.web2py_runtime_gae:# if running on Google App Engine from gluon.contrib.login_methods.gae_google_account import GaeGoogleAccount auth.settings.login_form = GaeGoogleAccount()

[web2py] Re: web2py with AppStats

2010-06-30 Thread PanosJee
I just edited the blog post cos i had forgot the appengine_config.py (thanx mdmcginn) On 30 Ιούν, 13:06, mdmcginn wrote: > I've added a appengine_config.py file in a comment to that blog post, > since AppStats didn't work for me without it. > > Guido van Rossum (who wrote AppStats) says, "it adds

[web2py] web2py freezing

2010-06-30 Thread Candid
I am using web2py in my organization for internal applications. One of the applications uses dedicated instance of web2py (v1.78.1) running on dedicated ubuntu server. It connects to our SQL Server 2005 database via freetds. It runs with the following parameters: python web2py.py -i ... -p ... -a

[web2py] Re: How may I do that

2010-06-30 Thread Chris S
>From the book: "next is the URL to redirect to after success. If the URL contains the substring "[id]" this will be replaced by the id of the record currently created/updated." While I haven't used that specifically I would say: form=crud.create(db.atable,next=URL(r=request,f='atable_read',args=

[web2py] Re: Accessing auth_user table

2010-06-30 Thread mdipierro
I'd like to know if the console reports any error when the ajax request is executed. On 30 Giu, 15:31, elfuego1 wrote: > I have firebug installed. What do you want me to look for? > You want to see some firebug output? > > On 30 Cze, 22:25, mdipierro wrote: > > > I do not see anything wrong in t

[web2py] Re: Accessing auth_user table

2010-06-30 Thread elfuego1
I have firebug installed. What do you want me to look for? You want to see some firebug output? On 30 Cze, 22:25, mdipierro wrote: > I do not see anything wrong in this. Do you use firebug? > > On 30 Giu, 15:18, elfuego1 wrote: > > > I hope I don't make your eyes bleed by puting all the code h

[web2py] Re: How may I do that

2010-06-30 Thread mdipierro
it is in form.vars.id. You can also use a shotcut: form=crud.create(db.atable,next='atable_read/[id]') On 30 Giu, 15:52, Jean-Guy wrote: > Hello, > > How may I pass the id of my entered record to an other function?? > > def atable_create(): >     if auth.has_membership(auth.id_group('group1')):

Re: [web2py] Re: Anvanced applications in gae

2010-06-30 Thread Carles Gonzalez
Now is working. Thanks, let's continue testing... On Wed, Jun 30, 2010 at 10:39 PM, mdipierro wrote: > You are right... fixing it in trunk..1..2..3..done. Please check it. > > Massimo > > On 30 Giu, 15:25, Carles Gonzalez wrote: >> Hi, i was trying this technique but i'm getting this traceback w

[web2py] Re: Caching downloads

2010-06-30 Thread mdipierro
If I understand you talk about normal static files. That is done in gluon/main.py static_file = parse_url(request, environ) if static_file: if request.env.get('query_string', '')[:10] == 'attachment': response.headers['Content-Dispositio

[web2py] How may I do that

2010-06-30 Thread Jean-Guy
Hello, How may I pass the id of my entered record to an other function?? def atable_create(): if auth.has_membership(auth.id_group('group1')): form=crud.create(db.atable,next=URL(r=request,f='atable_read'),message=T('form accepted')) elif form.errors: response.flash = T('f

[web2py] Re: Caching downloads

2010-06-30 Thread Chris S
I'll take a look and see what I can do. Can you point me to where this is happening? I see a streamer.py but no where does it set Cache-Control = no-cache. Where is that decision being made? I'm assuming in the same gluon module I'll find the logic behind the auto-stream of /static/filename? On

[web2py] Re: Anvanced applications in gae

2010-06-30 Thread mdipierro
You are right... fixing it in trunk..1..2..3..done. Please check it. Massimo On 30 Giu, 15:25, Carles Gonzalez wrote: > Hi, i was trying this technique but i'm getting this traceback when > using gae_google_account: > > Traceback (most recent call last): >   File "/Users/lauer/web2py/gluon/restr

[web2py] Re: Doctests keep getting stuck

2010-06-30 Thread mdipierro
The test controller generates " and that is a piece of html received via ajax, not xml. It should be valid. On 30 Giu, 15:25, Kerem Eryılmaz wrote: > I ran the admin application's test page for my controller > (i.e.http://127.0.0.1:8000/admin/default/test/std/etc.py) through firebug, > and i

[web2py] Re: Caching downloads

2010-06-30 Thread mdipierro
I may have sent the wrong link. There are two issues: 1) we tried to set a cache for static files in the past and we run into problems with ssl and ie. This was discussed at lenght in an old thread but I cannot find it now. 2) It is unclear whether serving static content should cache. In a product

Re: [web2py] Re: Anvanced applications in gae

2010-06-30 Thread Carles Gonzalez
Hi, i was trying this technique but i'm getting this traceback when using gae_google_account: Traceback (most recent call last): File "/Users/lauer/web2py/gluon/restricted.py", line 178, in restricted exec ccode in environment File "/Users/lauer/web2py/applications/web2pytodo/controllers/

[web2py] Re: Doctests keep getting stuck

2010-06-30 Thread Kerem Eryılmaz
I ran the admin application's test page for my controller (i.e. http://127.0.0.1:8000/admin/default/test/std/etc.py) through firebug, and it looks like it is an issue with the xml produced by web2py. The parser fails and the page is never updated (i.e. keeps flashing "please wait") but the response

[web2py] Re: Caching downloads

2010-06-30 Thread Chris S
I'm not sure I understand the comment. Following the link it says that Microsoft file formats can not be opened if the cache-control is set to no-cache. What I'm seeing is cache-control is *always* set to no-cache when I expected it to allow caching of files in /static. It seems that with the abo

[web2py] Re: Accessing auth_user table

2010-06-30 Thread mdipierro
I do not see anything wrong in this. Do you use firebug? On 30 Giu, 15:18, elfuego1 wrote: > I hope I don't make your eyes bleed by puting all the code here but > there is no other way to show it to you. > I made change only in one place of the code to gather "login" value: > {login:value} > Oryg

[web2py] Re: Accessing auth_user table

2010-06-30 Thread elfuego1
I hope I don't make your eyes bleed by puting all the code here but there is no other way to show it to you. I made change only in one place of the code to gather "login" value: {login:value} Oryginaly it was: {name:value}. $.post("{{=URL(r=request,c='default',f='ajaxuserexist')}}", {login:value}

[web2py] Re: Accessing auth_user table

2010-06-30 Thread mdipierro
This should give you an error because the print(username) is outside the funciton the function that defines username, after the function returns. How are you passing the username to the ajax call? Did you check with firebug that is calls the correct url? On 30 Giu, 15:01, elfuego1 wrote: > Ther

[web2py] Re: db and variables

2010-06-30 Thread mdipierro
What is connectionaa.smthng supposed to reference? You cannot reference a table that is not yet defined. Anyway db.xxx is the same as db['xxx'] On 30 Giu, 13:48, Rick wrote: > Hi, > > I'm trying to write loops in db.py: > > letters = ['a', 'b', 'c', 'd'] > for i in range(len(letters)): >      

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

2010-06-30 Thread mdipierro
this is how I make my hmac_kay >>> import uuid >>> print 'sha512:'+str(uuid.uuid4()) web2py has a function in gluon/admin.py, app_create('name',request) that clones welcome and replaces hmac_key='<>' with a random key generated as above. >From a web2py shell you can also do >>> from gluon.a

Re: [web2py] Re: What to Use... gluon.dal or gluon.sql ??

2010-06-30 Thread Phyo Arkar
Ok , thanks massimo. On Wed, Jun 30, 2010 at 4:24 PM, mdipierro wrote: > gluon/sql.py > > dal.py is an experimental rewrite that is stuck because of lack of > time. > > On 30 Giu, 10:55, Phyo Arkar wrote: > > I am confused ... :?

[web2py] db and variables

2010-06-30 Thread Rick
Hi, I'm trying to write loops in db.py: letters = ['a', 'b', 'c', 'd'] for i in range(len(letters)): for j in range(len(letters)): db.define_table('connection'+letters[i]+letters[j], SQLField('smthng', db.???letters[i])) What should I use instead

[web2py] Re: Accessing auth_user table

2010-06-30 Thread elfuego1
There was NO error messages. The code just didn't work. After inserting: print repr(username) to default.py I got: # -*- coding: utf-8 -*- # ## This is a samples controller ## - index is the default action of any application

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

2010-06-30 Thread Yarko Tymciurak
On Jun 30, 2:44 pm, Craig Younkins wrote: > If you'd like this moved to the developers list, just approve my application > and reply there. > > > When I say that MD5 is the default that applies only to the case that > > a hmac_key is not specified. This is 1) for backward compatibility; 2) > > bec

[web2py] Re: Caching downloads

2010-06-30 Thread mdipierro
Unfortunately settings cache-control breaks IE with SSL http://support.microsoft.com/kb/316431 On 30 Giu, 13:57, Chris S wrote: > I've had this bookmarked and have been looking over it recently.  I > added a c_download (cached download) function as described above to > allow local caching of fil

[web2py] Re: Accessing auth_user table

2010-06-30 Thread mdipierro
You can simplify it a bit def ajaxuserexist(): username = request.vars.values()[0] return db(db.auth_user.login==username).count() and 'yes' or 'no' although it will not solve your problem. There is nothing special in table auth_user so the problem is somewhere else. I suggest you i

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

2010-06-30 Thread Craig Younkins
If you'd like this moved to the developers list, just approve my application and reply there. > When I say that MD5 is the default that applies only to the case that > a hmac_key is not specified. This is 1) for backward compatibility; 2) > because without a key/salt sha512 and md5 are vulnerable

[web2py] Re: Accessing auth_user table

2010-06-30 Thread elfuego1
During registration I want to check on the fly, if login chosen by the user is already in use or is it not in db and available to be used. def ajaxuserexist(): username = request.vars.values()[0] query = (db.auth_user.login==username) numres = db(query).count() if numres > 0 :

[web2py] Re: Accessing auth_user table

2010-06-30 Thread Chris S
Probably a dumb question, but what are you checking the user against? Both my and your example above are checking for username and you didn't define a username in your auth_user. Your query then is not working as: def userexist(emailcheck): if db(db.auth_user.email==emailcheck).count() > 0:

[web2py] Re: Accessing auth_user table

2010-06-30 Thread elfuego1
auth.define_tables() is there as well but bellow auth_user table definition. On 30 Cze, 20:59, Chris S wrote: > And you've defined auth in db.py with: > > from gluon.tools import Auth > auth = Auth(globals(), db) > auth.define_tables() > > I've done searches on auth_user before... I think. > >

[web2py] Re: Disabling registration

2010-06-30 Thread Chris S
Oh I didn't understand the initial question. Here's one way to go about it, though I'm sure there are other (possibly easier) ways to do it. You first need to create a form for inserting users, and then protect it. The form can be created with CRUD. In your controller: @auth.requires_login() #r

[web2py] Re: Accessing auth_user table

2010-06-30 Thread elfuego1
Since I had added some fields (and intend to customize it further) to my auth_user table the code for auth_user in db.py looks like that: from gluon.tools import * auth=Auth(globals(),db) db.define_table('auth_user', SQLField('login', 'string', length=50, default=''), SQLField('password',

[web2py] Re: Accessing auth_user table

2010-06-30 Thread Chris S
And you've defined auth in db.py with: from gluon.tools import Auth auth = Auth(globals(), db) auth.define_tables() I've done searches on auth_user before... I think. On Jun 30, 1:44 pm, elfuego1 wrote: > Unfortunatelly it doesn't. > I can access any other table that's available through my appl

[web2py] Re: Caching downloads

2010-06-30 Thread Chris S
I've had this bookmarked and have been looking over it recently. I added a c_download (cached download) function as described above to allow local caching of files. The above code did not get me there though I ended up using: def c_download(): controller=request.vars.c file=request.vars.

[web2py] Re: Accessing auth_user table

2010-06-30 Thread elfuego1
Unfortunatelly it doesn't. I can access any other table that's available through my application but I can't get any value out of auth_user table. Is it somehow protected? Do I need to add some extra piece of code to expose them in my application in order to be able to acqiure any value out of them?

[web2py] Re: sql.py error?

2010-06-30 Thread dlypka
I will have a look at this tonight, using the WING IDE debugger, because _last_reference was a new property added at my suggestion, so I am somewhat familiar with it Looks like somehow the same SQL Row instance is being 'reused' for creating a new row which I would not expect to happen. - Dave Ly

[web2py] Re: Disabling registration

2010-06-30 Thread Deepan
I am clear with first point. Not with second one. How can I make only registered users to create new usersright now when I am logged in and click on register it redirects me to profile page. Thanks On Jun 30, 12:03 pm, Chris S wrote: > Check out the book located atwww.web2py.com/bookyou'll

[web2py] Doctests keep getting stuck

2010-06-30 Thread Kerem Eryılmaz
Hi all, I wonder if anyone encountered similar problems with doctests. I have a couple of controllers (default.py and etc.py), and a single function (__addTLI__) in etc.py that has a doctest. When I try to run the tests through the admin app, default.py passes fine (since it has no tests), but etc.

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

2010-06-30 Thread Phyo Arkar
Hello Torex Welcome to Web2py Group! Thats very good to have you here! I am trying to make elfinder work for web2py , please feel free to reuse my work in your release. Here is the Connector initiation: http://code.google.com/p/elfinder-web2py/source/browse/filemanager/controllers/default.py Ch

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

2010-06-30 Thread mdipierro
On 30 Giu, 12:19, Craig Younkins wrote: > "You may also want to ask some questions about form validation, > default validators and directory traversal attacks in file uploads. " > > Good idea. I'll add those. > > I've reviewed what you wrote on the wiki and some parts of the > application code, an

[web2py] Re: How to insert _blank in A html helper

2010-06-30 Thread Yarko Tymciurak
In general, any "attribute" for an HTML helper can be set by referring the the HTML tag name: this in the helper as: _this So, your original question can change to: "How do I set the target tag in the A() helper? On Jun 30, 10:36 am, Giuseppe Luca Scrofani wrote: > Sorry for the typo, it is

[web2py] Re: patch to dal [Re: bug in SQLFORM?]

2010-06-30 Thread Jose
On 30 jun, 14:04, mdipierro wrote: > If that can happen, than it is wrong. My understainding is that > because we are in a transaction, before the insert is committed we get > the id of the last record. > Okay, but "I believe" that everything about AUTO_INCREMENT fields are out of the transacti

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

2010-06-30 Thread Craig Younkins
"You may also want to ask some questions about form validation, default validators and directory traversal attacks in file uploads. " Good idea. I'll add those. I've reviewed what you wrote on the wiki and some parts of the application code, and I have a few preliminary recommendations to improve

[web2py] Re: Change "submit" text in generic submit button

2010-06-30 Thread mdipierro
I think what you need is this: form = SQLFORM(,submit_button=T('click me! me! me!')) or crud.messages.submit_button = 'click me to proceed' form=crud.create() On 30 Giu, 11:04, Giuseppe Luca Scrofani wrote: > Hi where I have to look to change the default "submit" string of > generic su

[web2py] Re: patch to dal [Re: bug in SQLFORM?]

2010-06-30 Thread mdipierro
If that can happen, than it is wrong. My understainding is that because we are in a transaction, before the insert is committed we get the id of the last record. On 30 Giu, 11:56, Jose wrote: > I was checking the file sql.py, seeing the way you get the IDs of the > different engine databases. I t

[web2py] Re: Change "submit" text in generic submit button

2010-06-30 Thread NetAdmin
Put something like this in your controller. INPUT( _type = 'submit', _value = 'Save', _style ='width: 100px;' ) On Jun 30, 11:04 am, Giuseppe Luca Scrofani wrote: > Hi where I have to look to change the default "submit" string of > generic submit button in something else? I'm not interested in

[web2py] Re: patch to dal [Re: bug in SQLFORM?]

2010-06-30 Thread Jose
I was checking the file sql.py, seeing the way you get the IDs of the different engine databases. I think the problem might occur with the use of "SELECT IDENT_CURRENT('tablename'); "in SQLServer, so have the other databases. That is, if that was inserted between the registry and retrieves the ID,

[web2py] Change "submit" text in generic submit button

2010-06-30 Thread Giuseppe Luca Scrofani
Hi where I have to look to change the default "submit" string of generic submit button in something else? I'm not interested in localizing the application (it have to remain english) but if it is the only way, how I can do this? Creating a "en" locales?

[web2py] Re: What to Use... gluon.dal or gluon.sql ??

2010-06-30 Thread mdipierro
gluon/sql.py dal.py is an experimental rewrite that is stuck because of lack of time. On 30 Giu, 10:55, Phyo Arkar wrote: > I am confused ... :?

[web2py] Re: Disabling registration

2010-06-30 Thread Chris S
Check out the book located at www.web2py.com/book you'll find a lot of useful information in it. For 1: Section 8.1 talks about restricting registration http://www.web2py.com/book/default/section/8/1?search=Restrictions+on+registration For 2: Section 8.2 talks about the settings built into Auth.

[web2py] What to Use... gluon.dal or gluon.sql ??

2010-06-30 Thread Phyo Arkar
I am confused ... :?

Re: [web2py] Re: How to insert _blank in A html helper

2010-06-30 Thread Giuseppe Luca Scrofani
Sorry for the typo, it is exactly a _blank target attribute desidered output link name

Re: [web2py] Re: How to insert _blank in A html helper

2010-06-30 Thread Philip Kilner
Hi Massimo, On 30/06/10 15:33, mdipierro wrote: what is a _black attribute? Can you provide an HTML example of the output you want? As I read it, the OP wants to set the target attribute = _blank, e.g. to open the link in a new window. HTH -- Regards, PhilK 'work as if you lived in t

[web2py] Re: problem with global variables

2010-06-30 Thread pk
but without session, it works. but i need for example broker in every controllerfunction (in each controller) On 30 Jun., 16:38, pk wrote: > does session work with: > > session.broker = > ALBroker("pythonBroker",BrokerIP,BrokerPORT,RoboIP,RoboPORT) > > than here i get an error > > On 30 Jun., 16:

[web2py] Re: problem with global variables

2010-06-30 Thread pk
does session work with: session.broker = ALBroker("pythonBroker",BrokerIP,BrokerPORT,RoboIP,RoboPORT) than here i get an error On 30 Jun., 16:19, pk wrote: > thanks massimo: > i still get errors here my model: > > import time > from naoqi import ALBroker > from naoqi import ALProxy > > broke

[web2py] Re: How to insert _blank in A html helper

2010-06-30 Thread mdipierro
what is a _black attribute? Can you provide an HTML example of the output you want? On 30 Giu, 09:18, Giuseppe Luca Scrofani wrote: > I can't find this little piece of information anywhere in the cyberspace... > > a simple plain link with html helpers: > > A(B('link name'), _href=URL(r=request, f

[web2py] Re: Which is faster?

2010-06-30 Thread mdipierro
I cannot quantify. If I run more tests I let you know. On 30 Giu, 09:04, weheh wrote: > How about postgresql & mysql? Can you quantify slower - by what %? > > On Jun 30, 3:21 am, mdipierro wrote: > > > I have done some tests in the past. On sqlite the like operator is > > slow, slower then the j

[web2py] Disabling registration

2010-06-30 Thread Deepan
Hi, I am relatively new to web2py. It would be great if somebody can guide me through this issues. 1. way to disable registration for anonymous users of the app. 2. When I am logged in as a authenticated user I'm redirected to my profile page instead of registration page. Please let me know how

[web2py] Re: problem with global variables

2010-06-30 Thread pk
thanks massimo: i still get errors here my model: import time from naoqi import ALBroker from naoqi import ALProxy broker = session.broker behaviorProxy = session.behaviorProxy ttsProxy = session.ttsProxy motionProxy = session.motionProxy testvariable = session.testvariable def connectRobo(roboi

[web2py] How to insert _blank in A html helper

2010-06-30 Thread Giuseppe Luca Scrofani
I can't find this little piece of information anywhere in the cyberspace... a simple plain link with html helpers: A(B('link name'), _href=URL(r=request, f='show', args=x.id)) How to put a _black attribute inside this?

[web2py] Re: ajax background function crashes web2py fcgi handler

2010-06-30 Thread ScOut3R
There's a simple workaround for this problem. I've tested it and it works fine. The concept is that I have to make the ajax request synchronous. For this purpose I've used the jQuery.ajax function instead of the web2py supplied one and I had to put everythin inside a queue. The code in my first pos

[web2py] Re: Needed Help

2010-06-30 Thread weheh
I built a comprehensive voice-controlled home automation system in python a few years ago. I believe I could easily connect it to web2py if I were so inclined. On Jun 30, 9:14 am, mdipierro wrote: > yes. Some people here use it to control robots. Do you have already > python API to the automation

[web2py] Filtered search of db by dropdown selection

2010-06-30 Thread Giuseppe Luca Scrofani
After two days of attempts I still can't figure it out. What I want is a set of dropdown selection, every one with some options and a submit button. When options are selected and submit pressed it start a search in a db table and return the list of all occurrence meeting all selected criteria... So

[web2py] Re: problem with global variables

2010-06-30 Thread weheh
If the statement "test=session.test" is within a controller and outside all defs, then it is global to that controller, but that's all. It's not accessible to other controllers. It probably is visible to the controller's views -- you'll have to check to be sure. However, session.test is accessible

[web2py] Re: Which is faster?

2010-06-30 Thread weheh
How about postgresql & mysql? Can you quantify slower - by what %? On Jun 30, 3:21 am, mdipierro wrote: > I have done some tests in the past. On sqlite the like operator is > slow, slower then the join. > > On 30 Giu, 01:38, weheh wrote: > > > I have a table 'x' with Field('z'), which is set via

[web2py] Re: problem with global variables

2010-06-30 Thread pk
ok thanks, and what can i do now with the variable test in the first line. can i use this now in every function in each controller? On 30 Jun., 15:12, mdipierro wrote: > I think you want a session variable, not a global variable > > test=session.test > > def changingtest(): >     session.test = 5

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

2010-06-30 Thread mdipierro
Hi Craig, You may also want to ask some questions about form validation, default validators and directory traversal attacks in file uploads. 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 Securit

[web2py] Re: Needed Help

2010-06-30 Thread mdipierro
yes. Some people here use it to control robots. Do you have already python API to the automation system? On 30 Giu, 07:13, nadeem jafar wrote: > I want to know that is it possible to code a home automation system > with web2py platform i need such type of automation system which can > automate A/

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

2010-06-30 Thread Troex Nevelin
Hello, I'm author of elFinder.py In about a month we plan to release new version of elFinder, mostly bugfixes but I also plan to rewrite python version to be more library like. I know there are problems integrating elfinder with different frameworks on python, current version was written for use

[web2py] Needed Help

2010-06-30 Thread nadeem jafar
I want to know that is it possible to code a home automation system with web2py platform i need such type of automation system which can automate A/C and another home appliances and give me complete reporting graph please suggest me

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

2010-06-30 Thread Troex Nevelin
Hello, I'm author of elFinder.py In about a month we plan to release new version of elFinder, mostly bugfixes but I also plan to rewrite python version to be more library like. I know there are problems integrating elfinder with different frameworks on python, current version was written for use

[web2py] Re: problem with global variables

2010-06-30 Thread mdipierro
I think you want a session variable, not a global variable test=session.test def changingtest(): session.test = 5 return None On 30 Giu, 07:42, pk wrote: > hi together, > > i need help to solve this problem: i have a global variable in the > model like: > > test = None > > def changingt

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

2010-06-30 Thread MikeEllis
I now have a workaround, but I don't like it very much. By checking the length of request.vars before calling form.accepts(), I can force the request formkey to match the session formkey, e.g. if len(request.vars): request.vars._formkey = session['_formkey[page_create]'] if form.

[web2py] problem with global variables

2010-06-30 Thread pk
hi together, i need help to solve this problem: i have a global variable in the model like: test = None def changingtest(): global test test = 5 return None how can i access to the variable test in every controllerfunction? thanks for your fast help peter

Re: [web2py] Re: OAuth and Web2Py Tutorial

2010-06-30 Thread Albert Abril
Nice :) In the article you used python-oauth2. As an alternative, if you want to use it with twitter, you can use tweepy. It adds client functions. http://joshthecoder.github.com/tweepy/docs/index.html Regards! On Tue, Jun 22, 2010 at 10:2

  1   2   >