Re: [web2py] Re: Group wont create

2014-04-17 Thread Anthony
If you are in a shell, you need to call db.commit() to commit any changes to the database (this is not necessary in app code because that is handled automatically during a normal HTTP request). Anthony On Thursday, April 17, 2014 5:30:35 PM UTC-4, Eduardo Cruz wrote: > from the console, it see

Re: [web2py] Re: Group wont create

2014-04-17 Thread Eduardo Cruz
from the console, it seems that if you have signature=True on auth it does not create groups when you are not logged in, if I make an user it works. On 17 April 2014 17:16, Anthony wrote: > Where/how are you calling auth.add_group? > > > On Thursday, April 17, 2014 4:08:27 PM UTC-4, Eduardo Cru

[web2py] Re: Group wont create

2014-04-17 Thread Anthony
Where/how are you calling auth.add_group? On Thursday, April 17, 2014 4:08:27 PM UTC-4, Eduardo Cruz wrote: > > Hey! > When I try to create a new group with auth.add_group('Administrators', > 'Administrators of the system') it return the id of the new group but the > group is not created on the

[web2py] Re: Hosting separate web2py application and PHP application on same apache fedora server

2014-04-17 Thread sonu kumar
Thanks a lot.. now it is working.. On Wednesday, 16 April 2014 19:09:20 UTC-7, LightDot wrote: > > Browser could not find... means exactly that. That might not be an apache > error at all... > > If your domain / subdomain names are correct, than you're missing DNS > entries for either caspdb or

[web2py] Group wont create

2014-04-17 Thread Eduardo Cruz
Hey! When I try to create a new group with auth.add_group('Administrators', 'Administrators of the system') it return the id of the new group but the group is not created on the database. but when I create an user and web2py create their group it got the next id, so I supposed that add_group is

Re: [web2py] Re: How to create a user progmatically?

2014-04-17 Thread Eduardo Cruz
Thanks :) On Thursday, April 17, 2014 1:57:57 PM UTC-4, Anthony wrote: > > password=db.auth_user.password.validate('mypassword')[0] > > Anthony > > > On Thursday, April 17, 2014 11:58:23 AM UTC-4, Eduardo Cruz wrote: > >> Thanks but how can I crypt the password? >> >> >> On 17 April 2014 11:47, An

[web2py] Re: Best way to implement SQL select query

2014-04-17 Thread Niphlod
you can use "contains" for 'text' fields if you want it turned to a "LIKE '%whatever%' query, or as a "find me where 'whatever' is" in a 'list:string' field. at this point a bit of code wouldn't hurt :D On Thursday, April 17, 2014 5:07:38 PM UTC+2, Rob Goldsmith wrote: > > Thanks Joe - changing

[web2py] Re: errors with input form

2014-04-17 Thread Niphlod
do you by any chance use a page where /a/c/f?numtofind=32193129 is allowed ? if yes, you got yourself played cutting and pasting without thinking too much :D what you should inspect is not request.vars.numtofind but form.vars.numtofind. request.vars.numtofind will hold ANY value submitted

[web2py] Re: Encrypting/decrypting db values

2014-04-17 Thread Niphlod
there are plenty of libraries more focused on the encryption. As any other thing where math, ciphers and security is involved, there is no magic bullet. On Thursday, April 17, 2014 7:19:22 PM UTC+2, Kiran Subbaraman wrote: > > Just checked and noticed that the encrypt/decrypt are not in gluo

[web2py] Re: Newbie print question

2014-04-17 Thread Dave S
On Thursday, April 17, 2014 8:48:17 AM UTC-7, jimbo wrote: > > Cheers Anthony, will have a go at that. Can I just comment out or remove > those lines. Thanks Jimmy. > Been there, done that, got the turtleneck: :-) /dps >

[web2py] Re: How can I open a page on a new tab?

2014-04-17 Thread Dave S
On Thursday, April 17, 2014 8:26:58 AM UTC-7, Oli wrote: > > > URL('Link for a new tab', _class="btn" , _title=T("in a new tab"), > _href=URL("default","yourcontroller",args=[row.id]), *_target='_blank'*) > I may be missing something, but this looks like it makes a button that when pressed g

Re: [web2py] Re: How to create a user progmatically?

2014-04-17 Thread Anthony
password=db.auth_user.password.validate('mypassword')[0] Anthony On Thursday, April 17, 2014 11:58:23 AM UTC-4, Eduardo Cruz wrote: > Thanks but how can I crypt the password? > > > On 17 April 2014 11:47, Anthony wrote: > >> There is >> >> auth.get_or_create_user(keys=dict(first_name='Eduardo'

[web2py] Re: Newbie print question

2014-04-17 Thread Anthony
Yes, you can just comment/remove those lines. On Thursday, April 17, 2014 11:48:17 AM UTC-4, jimbo wrote: > > Cheers Anthony, will have a go at that. Can I just comment out or remove > those lines. Thanks Jimmy. > > On Thursday, 17 April 2014 11:25:14 UTC+1, jimbo wrote: >> >> Right, I have made

[web2py] Re: Encrypting/decrypting db values

2014-04-17 Thread Kiran Subbaraman
Just checked and noticed that the encrypt/decrypt are not in gluon.utils. Definitely would like to see them part of web2py, instead of having to include this code in my application. Any plans? On Wednesday, June 26, 2013 1:53:32 AM UTC+5:30, Massimo Di Pierro wrote: > > Should we include decrypt

[web2py] Re: Encrypting/decrypting db values

2014-04-17 Thread Kiran Subbaraman
I just tried this, and it works as expected. Thanks for this useful piece of code Niphlod. Just a bunch of 'gotchas', which I thought might help someone else trying this code: - I had existing data in the table, which was in plain text format. When I introduced this code I encountered er

Re: [web2py] Re: How to create a user progmatically?

2014-04-17 Thread Eduardo Cruz
Thanks but how can I crypt the password? On 17 April 2014 11:47, Anthony wrote: > There is > > auth.get_or_create_user(keys=dict(first_name='Eduardo', ...), login=False) > > Anthony > > > On Thursday, April 17, 2014 11:25:07 AM UTC-4, Eduardo Cruz wrote: > >> How can I create a user progmatical

Re: [web2py] Nginx/passenger/web2py -> 504 Gateway Timeout?

2014-04-17 Thread LightDot
First thing, try ditching the symlink and copy the wsgihandler.py directly to passenger_wsgi.py. There might be a security measure in place, preventing symlinks. The next thing I'd try is seeing if the paths within the passenger_wsgi.py get proper values, but this might be a long shot. Since y

[web2py] Re: Newbie print question

2014-04-17 Thread jimbo
Cheers Anthony, will have a go at that. Can I just comment out or remove those lines. Thanks Jimmy. On Thursday, 17 April 2014 11:25:14 UTC+1, jimbo wrote: > > Right, I have made a simple database which works well and looks nice on > screen. That is in 'edit' everything looks as it should, every

[web2py] SQLFORM.grid search fields

2014-04-17 Thread John Fraser
How would one go about making certain fields readable (visible) to the search, view, edit, etc, but hidden from the actual grid. Below is my code that accomplishes the hiding the fields from the main grid, but struggling with making them readable to the search: @auth.requires_login() def index

[web2py] Re: How to create a user progmatically?

2014-04-17 Thread Anthony
There is auth.get_or_create_user(keys=dict(first_name='Eduardo', ...), login=False) Anthony On Thursday, April 17, 2014 11:25:07 AM UTC-4, Eduardo Cruz wrote: > How can I create a user progmatically? I'm trying to make a custom form > for login/register/etc > -- Resources: - http://web2py.co

[web2py] Re: How can I open a page on a new tab?

2014-04-17 Thread Oli
URL('Link for a new tab', _class="btn" , _title=T("in a new tab"), _href=URL("default","yourcontroller",args=[row.id]), *_target='_blank'*) Am Donnerstag, 17. April 2014 09:41:35 UTC+2 schrieb csavorgn: > Hi, > I'm using a SQLFORM.factory to let the user enter some data and I added a > button

[web2py] How to create a user progmatically?

2014-04-17 Thread Eduardo Cruz
How can I create a user progmatically? I'm trying to make a custom form for login/register/etc -- 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 Issues) --- You receiv

[web2py] errors with input form

2014-04-17 Thread LoveWeb2py
I created a search function where users can type in a set of numbers and search for them using: form=FORM('What is your n umber', INPUT(_name='numtofind', INPUT(_type='submit')) if form.accepts(request,session): numtofind = request.vars.numtofind Let's say a users number is "12345" a normal

[web2py] Re: Best way to implement SQL select query

2014-04-17 Thread Rob Goldsmith
Thanks Joe - changing the query to *belongs *did the trick although the query is still very slow when the list is long - but I'm not sure if that's primarily because I'm using sqlite at this stage? Niphlod - f_postcode is of type text and result is a list of strings (e.g. ['W1 2TR', 'SW1 5AB' .

[web2py] How can I open a page on a new tab?

2014-04-17 Thread csavorgn
Hi, I'm using a SQLFORM.factory to let the user enter some data and I added a button using buttons=[INPUT(_type="submit",_value="Go!")] When "Go!" is pressed a new page is opened using the following code: if form.process().accepted: redirect(URL("default","go", vars=dict(name=form.v

[web2py] Re: Newbie print question

2014-04-17 Thread Anthony
Bootstrap includes some "@media print" CSS rules, one of which displays the href of links right after the link (this is in bootstrap.min.css). See http://drupal.stackexchange.com/questions/59900/how-to-get-rid-of-added-urls-when-printing-a-bootstrap-themed-page. If you'd like, you can go to htt

Re: [web2py] Nginx/passenger/web2py -> 504 Gateway Timeout?

2014-04-17 Thread Krzysztof Socha
Yes - this is what I did. And yes - it seams to be a configuration issue... It is just that I have no clue where to look :( On Wednesday, April 16, 2014 12:59:36 PM UTC+2, LightDot wrote: > > So, I would say this is a configuration issue... But I'm not sure what's > the problem. @Krzysztof, whe

[web2py] Form + combined

2014-04-17 Thread Lucas Schreiber
hey, i have a Problem and i don't know how to solve it. I want a form with an Input "text" field ( let's call it "amount') and an part (let's call it 'area'). And, finally, a "submit" button. All this shall work as follow: You enter a number in "amount", choose an "area" and press "submit". O

[web2py] Is MongoDB support still experimental ?

2014-04-17 Thread Mandar Vaze
I have been seeing questions about web2py+mongo as old as 2009 I think Mongo support became official in 2.3.2 (may be earlier ?) but the documentation still continues to say "experimental" I will soon start a development for a product that requires MongoDB Considering our existing product is alrea

Re: [web2py] Re: Change the download text from "file" to something else?

2014-04-17 Thread António Ramos
HIHIHI, its like Port Wine, the older the better... Updating ASAP!!! 2014-04-17 11:00 GMT+01:00 Niphlod : > then it's just 'file'. > And come on, 2.0.9 is more than a year old! > > > On Thursday, April 17, 2014 11:07:04 AM UTC+2, Ramos wrote: > >> I´m using 2.0.9 on windows. >> >> >> >> >> 201

[web2py] Re: Newbie print question

2014-04-17 Thread jimbo
Sorry, the page displays on screen fine, it is when I send it to the printer that the extra 'garbage' appears. Thanks. On Thursday, 17 April 2014 11:57:48 UTC+1, LightDot wrote: > > I think there is a bit of vocabulary mismatch happening here. I assume > you, by "print", mean displaying generat

[web2py] Re: Newbie print question

2014-04-17 Thread LightDot
I think there is a bit of vocabulary mismatch happening here. I assume you, by "print", mean displaying generated html in the browser? In that case, please be more specific about what exactly you want removed or altered. Show us your code or a screenshot and state *exactly* what's the issue. R

[web2py] Newbie print question

2014-04-17 Thread jimbo
Right, I have made a simple database which works well and looks nice on screen. That is in 'edit' everything looks as it should, everything in nice neat boxes and that is how I would like it to print. However when I print the page a lot of other stuff appears which I gather are link details, a

Re: [web2py] Re: Change the download text from "file" to something else?

2014-04-17 Thread Niphlod
then it's just 'file'. And come on, 2.0.9 is more than a year old! On Thursday, April 17, 2014 11:07:04 AM UTC+2, Ramos wrote: > > I´m using 2.0.9 on windows. > > > > > 2014-04-16 21:36 GMT+01:00 Niphlod >: > >> what version are you using ? >> with latest stable (2.9.5), I just confirmed that the

[web2py] Re: 'auth.settings.register_verify_password = True' does not generate password confirmation field

2014-04-17 Thread Leonel Câmara
I would just use the form from auth.register() which already has it and use form.custom to make my custom form in the view. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (R

Re: [web2py] Re: Change the download text from "file" to something else?

2014-04-17 Thread António Ramos
I´m using 2.0.9 on windows. 2014-04-16 21:36 GMT+01:00 Niphlod : > what version are you using ? > with latest stable (2.9.5), I just confirmed that the string pops up quite > fine. > > > > > > Can you pack an app to reproduce ? > > > On Wednesday, April 16, 2014 4:23:06 PM UTC+2, Ramos wrote:

[web2py] Impersonate in Layers...

2014-04-17 Thread Joe Barnhart
I find I need the "impersonate" feature for a website I'm building -- it is the perfect solution to supporting users who forget how to work the website or need help setting up their profile information. In fact, I have a group called "support" who I am tasking with this chore and I want them to