[web2py] Re: login_next and next var

2014-02-04 Thread Annet
Massimo, Thanks for your reply. I tried: p class=text-centera class=btn btn-default onclick=javascript:openwindow('{{=URL('cms', 'default', 'user', args=['login', request.args(0)], vars=dict(_next='URL('cms', 'group', 'connect', args=request.args())'))}}', 'connect') role=buttonLogin/a But

[web2py] Satchless and web2py for e-commerce?

2014-02-04 Thread Michele Comitini
This project seems interesting to build e-shops with. http://satchless.com/ Has anyone tried it coupled with web2py? mic -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Can not run web2py_no_console.exe. Version 2.8.2 on win 7 x 64

2014-02-04 Thread step
In upgrading from 2.6.4 to 2.8.2 my custom-built web2py_no_console.exe failed starting the rocket server with a 'can't import module http' python error. It's something seemingly unrelated to the other posters' issues, but I'm sharing how I was able to fix it, maybe it will help someone.

[web2py] Two grids, different behaviour.

2014-02-04 Thread Johann Spies
I have the following models: db.define_table('survey', Field('name', label = 'Name of the new survey', requires = IS_NOT_IN_DB(db, 'survey.name'), unique = True), Field('owner', db.auth_user, default = auth.user_id,

[web2py] Re: only one session/login per user?

2014-02-04 Thread Anthony
I think check_client simply checks to make sure a given session cookie has come from the same client (i.e., to prevent cookie stealing), and it only works for file based sessions. Doesn't look like it would prevent two separate logins (which would simply have different sessions and therefore

[web2py] Re: login_next and next var

2014-02-04 Thread Massimo Di Pierro
Notice extra ' before 'URL On Tuesday, 4 February 2014 02:04:52 UTC-6, Annet wrote: Massimo, Thanks for your reply. I tried: p class=text-centera class=btn btn-default onclick=javascript:openwindow('{{=URL('cms', 'default', 'user', args=['login', request.args(0)],

[web2py] Re: Two grids, different behaviour.

2014-02-04 Thread Anthony
If there are args in your URL not generated by the grid, you have to tell the grid about it so it knows to include those args in the URLs it generates (otherwise it just includes its own args). So, if you are using the first URL arg for something, then do: SQLFORM.grid(...,

[web2py] can custom.form be used from the controller and pass to the view??

2014-02-04 Thread Richard
Hello, We are trying to manipulate form (a SQLFORM or a .factory) in the controller and then pass the customized form to the view. We want to do this to minimize the code at view level... But we face some quirks with form.custom.begin and .end May custom form be used from the controller like

Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-04 Thread Niphlod
that's the problem!!! Running external programs within the webserver execution model causes the thread to be killed if the request takes too much. It's process handling 101: NEVER spawn processes from the web application! On Monday, February 3, 2014 10:06:32 PM UTC+1, Encompass solutions wrote:

[web2py] dal retrieve one element from auth_user results in exception when none found

2014-02-04 Thread Boris Aguilar
In web2py~2.6 i used to rely on the following to check if an administrative user existed in database: a = db.auth_user(db.auth_user.username == 'admin') if a was None then the user wasn't in the database Now in latest version 2.8.2-stable+timestamp.2013.11.28.13.54.07 I'm getting a type error

[web2py] Re: Grid in component edit twice issue

2014-02-04 Thread Niphlod
are you using exactly the app you packed ? On Tuesday, February 4, 2014 2:53:41 AM UTC+1, Jim Karsten wrote: Originally the *Edit* button has this code: a class=button btn href= https://groups.google.com/testy/default/component.load/edit/person/1; data-w2p_target=c932772971645

[web2py] Re: Can not run web2py_no_console.exe. Version 2.8.2 on win 7 x 64

2014-02-04 Thread Niphlod
how are you custom building the binary ? The official scripts deals with py2exe's incorrect packaging system with these lines https://github.com/web2py/web2py/blob/master/extras/build_web2py/setup_exe.py#L100 BTW: we're moving towards bbfreeze packed binaries, and they seem to work well with

[web2py] Re: only one session/login per user?

2014-02-04 Thread Anthony
Note, this can be tricky. It is difficult to explicitly log out a user in one session based on a login within a different session. This is because technically sessions do not expire, so it's not easy to know if another login is still active, and it's also difficult to find a given session

[web2py] Re: dal retrieve one element from auth_user results in exception when none found

2014-02-04 Thread Anthony
On Tuesday, February 4, 2014 10:30:25 AM UTC-5, Massimo Di Pierro wrote: Should have been: a = db.auth_user(username = 'admin') The __call__ method of Table can also take a query as the first argument, so the original version should work as well (in fact, it works when I try it, on a

Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-04 Thread Michele Comitini
Jason, I think scheduler can do all you need. http://web2py.com/books/default/chapter/29/04/the-core#Scheduler HTH 2014-02-04 Niphlod niph...@gmail.com: that's the problem!!! Running external programs within the webserver execution model causes the thread to be killed if the request takes

[web2py] Re: dal retrieve one element from auth_user results in exception when none found

2014-02-04 Thread Massimo Di Pierro
Should have been: a = db.auth_user(username = 'admin') On Tuesday, 4 February 2014 08:59:04 UTC-6, Boris Aguilar wrote: In web2py~2.6 i used to rely on the following to check if an administrative user existed in database: a = db.auth_user(db.auth_user.username == 'admin') if a was None

Re: [web2py] can custom.form be used from the controller and pass to the view??

2014-02-04 Thread Anthony
Yes. Note, custom.begin and custom.end are a bit odd in that they are not web2py HTML helper objects -- this is because they do not represent a complete HTML element (one includes the opening form tag, and the other includes the closing form tag). Rather than manipulate form.custom.begin, it

[web2py] Re: Can not run web2py_no_console.exe. Version 2.8.2 on win 7 x 64

2014-02-04 Thread step
My setup_exe.py is attached. It adds matplotlib. My setup_exe.conf is the standard one plus copy_scripts: No. I also strip some folders/files from web2py_win.zip, namely: applications/admin, applications/welcome (but include welcome.w2p), applications/examples, tcl8.5/tzdata, and tk8.5/demos.

Re: [web2py] can custom.form be used from the controller and pass to the view??

2014-02-04 Thread Anthony
Hard to say without knowing what my_manipulate_form_containing_var is. On Tuesday, February 4, 2014 10:48:15 AM UTC-5, Richard wrote: So : My view should look like that {{=form.custom.begin}} {{=my_manipulate_form_containing_var}} {{=form.custom.begin}} ? Richard On Tue, Feb 4,

Re: [web2py] can custom.form be used from the controller and pass to the view??

2014-02-04 Thread Richard Vézina
So : My view should look like that {{=form.custom.begin}} {{=my_manipulate_form_containing_var}} {{=form.custom.begin}} ? Richard On Tue, Feb 4, 2014 at 10:42 AM, Anthony abasta...@gmail.com wrote: Yes. Note, custom.begin and custom.end are a bit odd in that they are not web2py HTML

Re: [web2py] Re: dal retrieve one element from auth_user results in exception when none found

2014-02-04 Thread Boris Aramis Aguilar Rodríguez
Everything is fine... it was a mistake on my behalf sorry :S it seems that i pulled some pre-compiled pyc stuff from a partner im working with that made some weird side effects; now all .pyc files are in my gitignore :) Thanks! Boris Aramis Aguilar Rodríguez Technology Projects Entrepreneur IT

Re: [web2py] can custom.form be used from the controller and pass to the view??

2014-02-04 Thread Richard Vézina
a bunch of form.custom.widget.field (not sure of the synthax) wrapped in a table for instance to change the display of the form... Richard On Tue, Feb 4, 2014 at 10:54 AM, Anthony abasta...@gmail.com wrote: Hard to say without knowing what my_manipulate_form_containing_var is. On Tuesday,

Re: [web2py] can custom.form be used from the controller and pass to the view??

2014-02-04 Thread Anthony
Seems fine, then. You can always try it and see if it works. On Tuesday, February 4, 2014 10:59:41 AM UTC-5, Richard wrote: a bunch of form.custom.widget.field (not sure of the synthax) wrapped in a table for instance to change the display of the form... Richard On Tue, Feb 4, 2014 at

Re: [web2py] can custom.form be used from the controller and pass to the view??

2014-02-04 Thread Richard Vézina
Yes! You right, I am just the man in the midle on this one... I have someone that tries the stuff for me. We try also to get the hidden form stuff with form.hidden_fields() as you suggest and get all the thing done from the controller... The form html seems valid html form but it failed to

[web2py] Setting DAL less strict from a model

2014-02-04 Thread Rene Dohmen
Hi Web2py-users, I have developed a CMS kind of system based on web2py. https://github.com/acidjunk/web2py-pages I actually want to provide a release as a w2p file on a regular basis, so it can be used more easily. But I'm running into a problem if I don't overwrite any core web2py app files.

[web2py] Re: login_next and next var

2014-02-04 Thread Annet
Notice extra ' before 'URL When I remove the ' ' around the URL a class=btn btn-default onclick=javascript:openwindow('{{=URL('cms', 'default', 'user', args=['login', request.args(0)], vars=dict(_next=URL('cms', 'group', 'connect', args=request.args(0}}', 'connect')

Re: [web2py] Re: login_next and next var

2014-02-04 Thread Jonathan Lundell
On 4 Feb 2014, at 10:32 AM, Annet anneve...@googlemail.com wrote: Notice extra ' before 'URL When I remove the ' ' around the URL a class=btn btn-default onclick=javascript:openwindow('{{=URL('cms', 'default', 'user', args=['login', request.args(0)], vars=dict(_next=URL('cms',

[web2py] Anyway to interact with SQL Database?

2014-02-04 Thread Austin Taylor
I am using mysql. I've tried importing MySQLdb, pymysql, and importing DAL. I want to have an interactive prompt that I can practice querying tables on. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Anyway to interact with SQL Database?

2014-02-04 Thread Austin Taylor
Perfect! Thank you On Feb 4, 2014 2:00 PM, Austin Taylor atayloru...@gmail.com wrote: I am using mysql. I've tried importing MySQLdb, pymysql, and importing DAL. I want to have an interactive prompt that I can practice querying tables on. -- Resources: - http://web2py.com -

Re: [web2py] Anyway to interact with SQL Database?

2014-02-04 Thread Richard Vézina
Start web2py with the command line (see web2py API in core chapter) and load your model the switch is -M... python web2py.py ... -M It will start a python shell with web2py environnement so you can interactively type you command to web2py... :) Richard On Tue, Feb 4, 2014 at 2:00 PM, Austin

[web2py] Re: Anyway to interact with SQL Database?

2014-02-04 Thread Anthony
Do you have an app set up with models for this db? If so, assuming you're running web2py from source, at the command line do: python web2py.py -S yourapp -M Anthony On Tuesday, February 4, 2014 2:00:40 PM UTC-5, Austin Taylor wrote: I am using mysql. I've tried importing MySQLdb, pymysql,

Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-04 Thread Jason Brower
HMM, the processes are very fast and never take long. maybe 5 seconds, but most of the time 1 or 2 seconds. Do I really need create a queing server for this? It's going to be a lot of database reading to make it happen smoothly. BR, Jason Brower On Tue, 2014-02-04 at 07:05 -0800, Niphlod wrote:

Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-04 Thread Niphlod
On Tuesday, February 4, 2014 8:43:16 PM UTC+1, Encompass solutions wrote: HMM, the processes are very fast and never take long. maybe 5 seconds, but most of the time 1 or 2 seconds. Do I really need create a queing server for this? It's going to be a lot of database reading to make it

Re: [web2py] Re: dal retrieve one element from auth_user results in exception when none found

2014-02-04 Thread Dave S
On Tuesday, February 4, 2014 7:57:28 AM UTC-8, Boris Aramis Aguilar Rodríguez wrote: now all .pyc files are in my gitignore :) Wisdom of the ages! /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Setting DAL less strict from a model

2014-02-04 Thread Michele Comitini
Hi Rene, try testing with trunk, remove check_reserved and add the following to DAL parameters: DAL(., entity_quoting=True) after that you should have no conflict with reserved SQL words. You should be able to use any name, e.g. do things like define_table('table', Field('select'),

Re: [web2py] Problems with the server stalling out. Setting up debuging.

2014-02-04 Thread Ricardo Pedroso
On Tue, Feb 4, 2014 at 8:11 PM, Niphlod niph...@gmail.com wrote: On Tuesday, February 4, 2014 8:43:16 PM UTC+1, Encompass solutions wrote: HMM, the processes are very fast and never take long. maybe 5 seconds, but most of the time 1 or 2 seconds. Do I really need create a queing server for

[web2py] Is there a more Python-ic, Web2Py-ish way to accomplish this query?

2014-02-04 Thread A36_Marty
I wrote the following query function that works fine / accomplishes the goal. However, being new to web2py, Python, etc., I'm wondering if I am missing much smarter/better ways to accomplish the same outcome -- so as to better guide my future efforts. Thanks in advance for the advice. Table

[web2py] Model or ModelLess?

2014-02-04 Thread Ruud Schroen
I see some applications in web2py appliances that use modules instead of models. Is there an advantage to this? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report

[web2py] Re: Model or ModelLess?

2014-02-04 Thread Anthony
It can be more efficient because the modules only have to be read in once upon first import, and you can then easily import and define just the models you need for a given request. By default, all model files are read and executed on every request. Model files can be executed conditionally,

[web2py] Started web2py - doesn't not offer to run on my local IP

2014-02-04 Thread Jim S
See attached screenshot. ipconfig on my machine shows my IPv4 Address as 192.168.125.112. But, web2py doesn't offer this as an IP to use for my testing. Can anyone tell me how to get my local IP available to use? Need to test with iPad -Jim -- Resources: - http://web2py.com -

[web2py] Re: Satchless and web2py for e-commerce?

2014-02-04 Thread samuel bonill
yes, look : https://github.com/mdipierro/web2py-appliances/tree/master/EStore El martes, 4 de febrero de 2014 06:31:45 UTC-5, Michele Comitini escribió: This project seems interesting to build e-shops with. http://satchless.com/ Has anyone tried it coupled with web2py? mic --

[web2py] Re: Satchless and web2py for e-commerce?

2014-02-04 Thread samuel bonill
this app was build with web2py : nammuhats.com El martes, 4 de febrero de 2014 06:31:45 UTC-5, Michele Comitini escribió: This project seems interesting to build e-shops with. http://satchless.com/ Has anyone tried it coupled with web2py? mic -- Resources: - http://web2py.com -

[web2py] Re: Satchless and web2py for e-commerce?

2014-02-04 Thread LightDot
I don't think EStore is using Satchless, or am I missing something... It's late over here, I wouldn't be surprised :) Regards On Wednesday, February 5, 2014 4:00:31 AM UTC+1, samuel bonill wrote: yes, look : https://github.com/mdipierro/web2py-appliances/tree/master/EStore El martes, 4

[web2py] error postgresql with table new :S

2014-02-04 Thread Luis Díaz
db = DAL('postgres://usuario:puerto@localhost:5432/welcome', pool_size=1,check_reserved=['all'], fake_migrate_all=True) db.define_table('denuncia', Field('status', 'integer', default=0, writable=False, readable=False), Field('descripcion', 'text'),

Re: [web2py] Re: Two grids, different behaviour.

2014-02-04 Thread Johann Spies
Thanks. I did not know about that. Regards Johann On 4 February 2014 16:26, Anthony abasta...@gmail.com wrote: If there are args in your URL not generated by the grid, you have to tell the grid about it so it knows to include those args in the URLs it generates (otherwise it just includes