[web2py] Re: web2py 2.5.1 is OUT

2013-06-06 Thread 黄祥
great work, btw, for new features, is it already documented in http://web2py.com/book? thanks and best regards On Thursday, June 6, 2013 10:59:30 PM UTC+7, Massimo Di Pierro wrote: > > CHANGELOG > > - New style virtual fields in grid > - Conditional fields (experimental) ``db.table.field.show_id

Re: [web2py] Re: Python 3 compatibility?

2013-06-06 Thread Anthony
> > For example, I need web2py to provide python 2.6 compatibility for at > least another 5 years. I'm going to need python 2.7 compatibility for at > least another 10 years if not longer. I don't know if your particular application(s) make use of many other Python libraries, but if they do,

[web2py] Re: I am confused by documentation for LOAD

2013-06-06 Thread Tim Richardson
thank you. > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/grou

[web2py] Re: redirect after registration issue

2013-06-06 Thread Anthony
Yes, you should not call .process() after calling auth.register() because the second time through .process() it will fail (the _formkey token is only good for one process -- so it fails on the second). Using an onaccept callback is the way to go. However, it appears you are allowing your users

[web2py] Re: I am confused by documentation for LOAD

2013-06-06 Thread Anthony
Yes. More generally, when you call the URL() function without specifying an extension, it will automatically append request.extension, unless request.extension is "html". So, it's really the URL() function that is propagating the extension (as long as you don't explicitly specify an alternative

Re: [web2py] boolean_widget

2013-06-06 Thread Jose
the boolean types have a default widget, which is a checkbox, when is > checked is True, and when is not is False, becouse it is empty... when > you Choose Si or No, you send a value so you get True becouse it is not > empty to be False. > > I thinks that's the problem. > Your comment is ri

[web2py] Re: I am confused by documentation for LOAD

2013-06-06 Thread Tim Richardson
Out of mild curiosity (but not enough to actually try it), does this suffix functionality work with redirect(URL(...)) ? [this was the orthogonal part of my question] -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from t

[web2py] Re: redirect after registration issue

2013-06-06 Thread lesssugar
OK, I figured out something like this and it works (let me know if it's not correct in any way): In db.py model: auth.settings.create_user_groups = False and then def add_group(form): group_id = auth.id_group(role=request.args(0)) auth.add_membership(group_id, form.vars.id) auth.sett

Re: [web2py] boolean_widget

2013-06-06 Thread Marco Mansilla
El Thu, 6 Jun 2013 16:07:41 -0700 (PDT) Jose escribió: > Hello > > I have the following > > def boolean_widget(field, value): > return SELECT( > OPTION('Si', _value=True), > OPTION('No', _value=False), > _name=field.name, > _id='%s_%s' % (fiel

[web2py] Re: redirect after registration issue

2013-06-06 Thread lesssugar
Sorry, there is one more "but". After renaming the form all goes well, except that this piece of code if register_form_s.accepts(request.vars, formname='register'): auth.add_membership(group_id=1, user_id=register_form_s.vars.id) no longer adds the right membership to user. It gives them the

Re: [web2py] Re: Python 3 compatibility?

2013-06-06 Thread LightDot
There is a lot of individual, anecdotal data in threads like this... For example, I need web2py to provide python 2.6 compatibility for at least another 5 years. I'm going to need python 2.7 compatibility for at least another 10 years if not longer. And I couldn't care less for python 3 compati

[web2py] Re: redirect after registration issue

2013-06-06 Thread lesssugar
Yes, renaming the form to "register" did the trick. Thank you. On Friday, June 7, 2013 1:11:23 AM UTC+2, Anthony wrote: > > I think the form processing within the auth.register() function is > probably failing because you have renamed the form to 's_registration', and > it is expecting a form na

[web2py] Re: redirect after registration issue

2013-06-06 Thread Anthony
I think the form processing within the auth.register() function is probably failing because you have renamed the form to 's_registration', and it is expecting a form named 'register' (it uses the formname to check the _formkey value in the session). If the form doesn't get accepted, it doesn't

[web2py] boolean_widget

2013-06-06 Thread Jose
Hello I have the following def boolean_widget(field, value): return SELECT( OPTION('Si', _value=True), OPTION('No', _value=False), _name=field.name, _id='%s_%s' % (field._tablename, field.name), ) tb_algo = db.define_table('algo',

Re: [web2py] Re: Python 3 compatibility?

2013-06-06 Thread Tim Richardson
Migrating to new platforms is easy. You just have to put back the Start button. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googleg

[web2py] Re: web2py 2.5.1 is OUT

2013-06-06 Thread Paulo
Thanks for the awesome work with this awesome framework all this time :) Quinta-feira, 6 de Junho de 2013 16:59:30 UTC+1, Massimo Di Pierro escreveu: > > CHANGELOG > > - New style virtual fields in grid > - Conditional fields (experimental) ``db.table.field.show_id = > db.table.otherfield==True`

[web2py] Re: redirect after registration issue

2013-06-06 Thread lesssugar
Right, thanks. But what about the "next" attribute? What might be the reason of the arument not working? On Friday, June 7, 2013 12:53:35 AM UTC+2, Anthony wrote: > > auth.register() automatically processes the form, so you should not > subsequently call request_form.process(). > > Anthony > > O

[web2py] Re: redirect after registration issue

2013-06-06 Thread Anthony
auth.register() automatically processes the form, so you should not subsequently call request_form.process(). Anthony On Thursday, June 6, 2013 6:21:52 PM UTC-4, lesssugar wrote: > > After user registers, I would like to redirect them to a different URL, > let's say default/index. > > Auto-logi

[web2py] redirect after registration issue

2013-06-06 Thread lesssugar
After user registers, I would liketo register them to a different URL, let's say default/index. Auto-login in db.py is set to False. In my default.py controller I have sth this: register_form = auth.register(next=URL('default', 'index')) register_form.update(_class='formstyle', _name='s_reg

[web2py] Re: Remember me with custom or alternate login?

2013-06-06 Thread Mark Li
Ahh yep that did the trick, thanks for the help Anthony! On Thursday, June 6, 2013 3:07:31 PM UTC-7, Anthony wrote: > > Yes, sorry, there's one more thing you have to do -- you have to convert > the session cookie to a non-session cookie: > > response.cookies[response.session_id_name]["expires"]

Re: [web2py] Re: Python 3 compatibility?

2013-06-06 Thread Derek
Well, that's an issue with breaking compatibility. I've seen it happen several times with Python 2.x to 3.x, Zope 2.x to 3.x and the whole Zope Five fiasco. The problem is when you break compatibility you are essentially telling your developers that all that hard work they did will have to be d

Re: [web2py] Re: Python 3 compatibility?

2013-06-06 Thread Anthony
Even for existing users, at some point sticking with Python 2 can start to become a liability as some new libraries are released in Python 3 only or existing libraries migrate to Python 3 only. I use rpy2, which is an interface between Python and R, and the latest development branch has dropped

[web2py] Re: Remember me with custom or alternate login?

2013-06-06 Thread Anthony
Yes, sorry, there's one more thing you have to do -- you have to convert the session cookie to a non-session cookie: response.cookies[response.session_id_name]["expires"] = session.auth. expiration That will happen the next time Auth is initialized (which would happen on the next request), but

[web2py] Re: Remember me with custom or alternate login?

2013-06-06 Thread Mark Li
Here's the relevant part of the code I'm using. I make an ajax call to the function below def ajax_login(): email = request.vars.email password = request.vars.password remember_me = request.vars.remember_me user = auth.login_bare(email, password) if user: if remember_

Re: [web2py] is there a dicateded request something to verify if a function get call by a browser?

2013-06-06 Thread Anthony
What is the problem with the A() helper? Is it that the URL is a relative URL rather than an absolute URL? If you need an absolute URL, you can do: A('myrepresent', _href=URL(..., scheme=True)) If that's the issue, the leaving scheme=True will work in both cases, so you don't necessarily need t

[web2py] Re: reloading part of the page (components) based on UI events (changes in checkbox, radiobox, etc)

2013-06-06 Thread shartha
Hi Anthony, Here is my view page: $(document).ready(function(){ map = new GMaps({ div: '#map', lat: {{=lattitude}}, lng: {{=longitude}}, enableNewStyle: true }); }); {{=form.custom.begin}} City: {{=form.custom.widget.city}} {{=form.cust

[web2py] is there a dicateded request something to verify if a function get call by a browser?

2013-06-06 Thread Richard
Hello, I found my self need to check if a function is call by browser or is call internally by an other function... I want to re-use a function in a weekly email sent automatically and want my code to be as DRY as possible... Until now, I have something like this : def normal_page_function()

Re: [web2py] Re: Python 3 compatibility?

2013-06-06 Thread Michael Lutynski
That's not true for me. I have been fascinated with web2py for the longest time, and now I'm finally able to use it, I was sincerely hoping that there would be a Python 3 option. But since I do not know anything about web2py at all at this point, it makes it a daunting proposition to consider h

[web2py] Re: web2py_component with helper A(cid=request.cid) and LOAD()

2013-06-06 Thread Niphlod
pack a MINIMAL app to show what you mean. This is working perfectly here. def index(): a = LOAD('default', 'loaded.load') return locals() def loaded(): a = A('click to reload', _href=URL('loaded.load'), cid=request.cid) b = request.now return locals() go to the index page, s

Re: [web2py] Re: I liked this

2013-06-06 Thread Michele Comitini
Nice! 2013/6/6 Rob_McC > Excellent... thanks.. > > I was sure this was a twitter bootstrap, or skeleton, or something > responsive, > it looks modern and flat UI. > > It's not responsive... and uses an older tag... > > "http://www.w3.org/TR/html4/loose.dtd";> > > Not sure why... > > Sure great

Re: [web2py] Re: How to start web2py at server reboot

2013-06-06 Thread Michele Comitini
I highly recommend daemontools easy and stable. This is a recipe I wrote for using scgihandler.py: http://www.web2pyslices.com/slice/show/1518/running-scgi-with-daemontools replace scgihandler.py in the run script with (use the options you need): web2py.py -a -i 0.0.0.0 And that's it. mic 201

[web2py] Re: Customize SQLFORM.grid fields

2013-06-06 Thread Niphlod
grid uses represent if available. http://web2py.com/books/default/chapter/29/06?search=represent#Record-representation On Thursday, June 6, 2013 2:46:47 PM UTC+2, keep...@gmail.com wrote: > > Hello everyone. > > I'm new to web2py and I have a question about customizing fields in > SQLform.grid.

[web2py] Re: Customize fields of SQLFORM.grid

2013-06-06 Thread Niphlod
duplicate, answered in the other thread. On Thursday, June 6, 2013 2:37:05 PM UTC+2, keep...@gmail.com wrote: > > Hello everyone. > > I'm new to web2py and I have a question about customizing fields in > SQLform.grid. Probably the most frequently asked question for you :) > > Let me describe what

Re: [web2py] Re: apache-modwsgi problem

2013-06-06 Thread Niphlod
ehm... I maybe missing something but your traceback starts here [Tue Jun 04 07:43:49 2013] [error] Traceback (most recent call last): [Tue Jun 04 07:43:49 2013] [error] File "/home/www-data/web2py/gluon/ admin.py", line 377, in check_new_version all errors after that are at the same time repo

[web2py] Re: How to start web2py at server reboot

2013-06-06 Thread Jose C
How about using the server cron process? I use this on CentOs and it works perfectly. To edit crontab, type: crontab -e In the crontab file, insert this line: @reboot /usr/local/bin/python2.7 /path/to/your/web2py/dir/web2py.py -p 8000 -a '' --nogui --no-banner The -p parameter specifies t

Re: [web2py] How to copy record from a table and paste it into a new record in the same table

2013-06-06 Thread Alex Glaros
Need some help in deploying Marin's advice. To actually select a record is difficult for me to conceptualize. Is it possible to leverage a grid to do the selection, and also provide prompts for the displayName fields? Here's a sample of my idea below. Can this be fixed so it works? thanks, A

Re: [web2py] Re: Web Development Introduction Based On Web2py

2013-06-06 Thread Sundar Nadimpalli
Wow. Very happy to note that. ~~ Sundar Ramanujam Nadimpalli Signum Product Solutions Ph: +91-80-23453248 Cell: +91-9880712035 Email: sun...@signumsol.com Web: www.signumsol.com Skype: sundar.nadimpalli On Thu, Jun 6, 2013 at 11:34 PM, Vinicius Assef wrote: >

[web2py] web2py_component with helper A(cid=request.cid) and LOAD()

2013-06-06 Thread Charles Levesque
Hi everyone, I have a problem with a component. Within a view, I load a component with the LOAD function of web2py. //- a_view.html {{=LOAD(f='phone_numbers.load',args=('profile'),vars=dict(user_id=auth.user_id), ajax=True, target="ph

Re: [web2py] Re: Web Development Introduction Based On Web2py

2013-06-06 Thread Vinicius Assef
The site is back again. On Thu, Jun 6, 2013 at 2:31 AM, Sundar Nadimpalli wrote: > Hi Marco, > I have a heard lot of praise for your tutorial and can't wait to get > started. But your site is down and returns a 502. I know that you may be > busy with other things, but still I would like to reques

Re: [web2py] web2py 2.5.1 is OUT

2013-06-06 Thread Vinicius Assef
Excelent! \o/ On Thu, Jun 6, 2013 at 1:02 PM, Marin Pranjić wrote: > show_id --> show_if > > :) > > > On Thu, Jun 6, 2013 at 5:59 PM, Massimo Di Pierro > wrote: >> >> CHANGELOG >> >> - New style virtual fields in grid >> - Conditional fields (experimental) ``db.table.field.show_id = >> db.table.

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread Anthony
LOAD(url=URL('otherapp', 'controller', 'function', ...)) When specifying the "url" argument, you don't have to bother setting ajax=True, as external URL's are always loaded via Ajax. Anthony On Thursday, June 6, 2013 12:44:46 PM UTC-4, Ramos wrote: > > LOAD signature does not show where i can s

[web2py] admin - create button does not set focus

2013-06-06 Thread António Ramos
hello, its a minor suggestion but when i press "create" to create a file like controller/view/etc it does not set focus on the input field. Thank you António -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group a

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread António Ramos
LOAD signature does not show where i can specify another app LOAD(c=None, f='index', args=[], vars={}, extension=None, target=None, ajax=False, ajax_trap=False, url=None,user_signature=False, timeout=None, times=1, content='loading...',**attr): 2013/6/6 António Ramos > Anthony, your first

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread António Ramos
Anthony, your first suggestion seems more productive LOAD !!! thank you 2013/6/6 Anthony > > http://web2py.com/books/default/chapter/29/06#Using-DAL-without-define-tables > > > On Thursday, June 6, 2013 11:55:34 AM UTC-4, Ramos wrote: > >> how do i connect to another app sqlite database? >> >

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread Anthony
http://web2py.com/books/default/chapter/29/06#Using-DAL-without-define-tables On Thursday, June 6, 2013 11:55:34 AM UTC-4, Ramos wrote: > > how do i connect to another app sqlite database? > > > > 2013/6/6 Anthony > > >> If you import the module from B within A, the B module doesn't get the >> "c

[web2py] Re: Nested groups/roles for authorization

2013-06-06 Thread Massimo Di Pierro
The web2py RBAC is flexible but interoperates with AD via LDAP only at the level of authentication. Group and access information are not shared between web2py and LDAP. On Thursday, 6 June 2013 07:28:38 UTC-5, Alfonso E.M. wrote: > > > Hello! > > I am planning a system to manage gnu/linux workst

Re: [web2py] web2py 2.5.1 is OUT

2013-06-06 Thread Marin Pranjić
show_id --> show_if :) On Thu, Jun 6, 2013 at 5:59 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > CHANGELOG > > - New style virtual fields in grid > - Conditional fields (experimental) ``db.table.field.show_id = > db.table.otherfield==True`` or ``db.table.field.show_id = > db.tabl

[web2py] Customize SQLFORM.grid fields

2013-06-06 Thread keeperdss
Hello everyone. I'm new to web2py and I have a question about customizing fields in SQLform.grid. Probably the most frequently asked question for you :) Let me describe what I want to do: There is a table consisting of the following columns: id | min_time | max_time | execute_time | level_warn

[web2py] Re: Web Development Introduction Based On Web2py

2013-06-06 Thread Sundar Nadimpalli
Hi Marco, I have a heard lot of praise for your tutorial and can't wait to get started. But your site is down and returns a 502. I know that you may be busy with other things, but still I would like to request you to consider bringing the site back up. Thanks, Sundar On Wednesday, December 2

[web2py] Customize fields of SQLFORM.grid

2013-06-06 Thread keeperdss
Hello everyone. I'm new to web2py and I have a question about customizing fields in SQLform.grid. Probably the most frequently asked question for you :) Let me describe what I want to do: There is a table consisting of the following columns: id | min_time | max_time | execute_time | level_warn

[web2py] Nested groups/roles for authorization

2013-06-06 Thread Alfonso E.M.
Hello! I am planning a system to manage gnu/linux workstations (currently under Active Directory control). I love to make the control server with web2py but I am not sure if web2py RBAC implementation can cope with nested groups as Active Directory does. Any clues? Thanks in advance! -- -

[web2py] web2py 2.5.1 is OUT

2013-06-06 Thread Massimo Di Pierro
CHANGELOG - New style virtual fields in grid - Conditional fields (experimental) ``db.table.field.show_id = db.table.otherfield==True`` or ``db.table.field.show_id = db.table.otherfiel\ .contains(values)`` - auth.settings.manager_group_role="manager" enables http://.../app/appadmin/auth_manage

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread António Ramos
how do i connect to another app sqlite database? 2013/6/6 Anthony > If you import the module from B within A, the B module doesn't get the > "current" object from the B app -- that object is created when the db.py > model file of the B app gets executed, which is not happening here. If you > w

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread Anthony
If you import the module from B within A, the B module doesn't get the "current" object from the B app -- that object is created when the db.py model file of the B app gets executed, which is not happening here. If you want to use the db from app B, you could either create the DAL connection ob

[web2py] user text contains semi-colons

2013-06-06 Thread Carl
I've a browser app that calls a Web2py server app; it builds up URLs to pass data. Some of that data might be from an end-user and if that data contains a semi-colon it "breaks" web2py's parsing of the URL into args and vars (specifically it breaks the vars parsing) Q1. Any suggestions of the

Re: [web2py] Re: How to disable modifying Email in auth.profile()

2013-06-06 Thread 冷春辉
Thanks for sharing! Lio On Thu, Jun 6, 2013 at 10:49 PM, Rob_McC wrote: > Lio: > > Not sure if this would be helpful, it was for my app. It seems to work so > far. > > *This allows users to login with > * > - email > OR > - username > > I have a message reminding them they can login with eithe

Re: [web2py] Re: Is there a way to hide a directory from appadmin?

2013-06-06 Thread Tito Garrido
Thanks! Issue opened: http://code.google.com/p/web2py/issues/detail?id=1517 On Thu, Jun 6, 2013 at 12:13 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > No but please open a ticket. There should be a cap and eventually it > should stop listing the files. > > > On Thursday, 6 June 20

Re: [web2py] Re: How to disable modifying Email in auth.profile()

2013-06-06 Thread Anthony
> > Since email will be used as the only identification here, I'm not very > confident after changing it couple of times the user won't mess up his > memory on the latest email for login.. I think you might run into the opposite problem. If someone signs up with myn...@domain1.com but later c

[web2py] Re: Is there a way to hide a directory from appadmin?

2013-06-06 Thread Massimo Di Pierro
No but please open a ticket. There should be a cap and eventually it should stop listing the files. On Thursday, 6 June 2013 09:51:44 UTC-5, Tito Garrido wrote: > > Hey Folks, > > My System has been creating some static files on /myapp/static/afolder/ > > There is more than 1000 directories insid

[web2py] Is there a way to hide a directory from appadmin?

2013-06-06 Thread Tito Garrido
Hey Folks, My System has been creating some static files on /myapp/static/afolder/ There is more than 1000 directories inside of this folder that is preventing app admin from loading... is there a way to ask appadmin to do not scan this folder? Regards, Tito -- Linux User #387870 .__

[web2py] Re: How to disable modifying Email in auth.profile()

2013-06-06 Thread Rob_McC
Lio: Not sure if this would be helpful, it was for my app. It seems to work so far. *This allows users to login with * - email OR - username I have a message reminding them they can login with either. I don't allow changing username, but allow changing email. I also will remove the Forgot you

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread António Ramos
Well, seems an easy task but i´m stuck How can i get in app A a sqlform.smartgrid(db.auth_user) from app B? db is B's db in app A i call the app B module from applications.B.modules.funcs import * def calmais(): return mais() In app B *in db.py* current.db = db *i have a module funcs.py

[web2py] Got Logging working on my Mac - mail.settings.server = 'logging' - for testing emails, without sendi

2013-06-06 Thread Rob_McC
Just wanted to share this. Good news, I actually got this to work on localhost... and it was pretty easy. I wanted to use "logging"while doing a lot of testing,

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread António Ramos
gotcha from applications.myapp.modules.funcs import func Nice ! 2013/6/6 António Ramos > How do i import a module from another app? > > > 2013/6/5 Niphlod > >> and nobody stops you to call other apps pages inside your "master" >> one, e.g., using LOAD, and "elect" a master app to take car

Re: [web2py] Re: How to disable modifying Email in auth.profile()

2013-06-06 Thread 冷春辉
For the first issue of inputting wrong email, this can be solved by email verification. For the second concern I agree if the user's email become invalid they will not be able to receive message to this address but they still have his account with the site. Since email will be used as the only iden

Re: [web2py] Using Web2py in a multi app environment.

2013-06-06 Thread António Ramos
How do i import a module from another app? 2013/6/5 Niphlod > and nobody stops you to call other apps pages inside your "master" > one, e.g., using LOAD, and "elect" a master app to take care of > authorization with CAS. > > On Wednesday, June 5, 2013 7:21:39 PM UTC+2, Ramos wrote: > >> I h

Re: [web2py] Re: apache-modwsgi problem

2013-06-06 Thread Johann Spies
On 6 June 2013 12:57, Niphlod wrote: > that just seems to be the version check that admin does when you load the > main page. are you sure that is an error you WANT to "patch"? > [Tue Jun 04 07:43:49 2013] [error] File > >> "/usr/lib/python2.7/socket.py", line 571, in create_connection >> [Tue

[web2py] Re: I liked this

2013-06-06 Thread Rob_McC
Excellent... thanks.. I was sure this was a twitter bootstrap, or skeleton, or something responsive, it looks modern and flat UI. It's not responsive... and uses an older tag... http://www.w3.org/TR/html4/loose.dtd";> Not sure why... Sure great advise though Rob -- --- You received thi

[web2py] Re: I am confused by documentation for LOAD

2013-06-06 Thread Anthony
Note, the advantage of using a special extension (such as .load) for components is that when a component action does a redirect, the extension will propagate to the redirect (assuming the redirect uses the URL() function and doesn't explicitly specify an extension). Anthony On Thursday, June 6

[web2py] Re: I am confused by documentation for LOAD

2013-06-06 Thread Anthony
> {{=LOAD('default','load_video'}} uses the view: generic.load, > unfortunately ignoring the intended view: default/load_video.load > The .load extension is just a convention -- there's nothing special about it. If you don't specify any extension, as usual, it will default to .html. Above, it

[web2py] Re: Removing Foreign Key constraint?

2013-06-06 Thread Lamps902
To clarify, due to the SQL Foreign Key constraint (which is retained when archive tables are created through auth.enable_record_versioning), some of the archive database's tables still retain an association with the auth_user table's id field. However, the rows with the ids on which the new tab

[web2py] I am confused by documentation for LOAD

2013-06-06 Thread Tim Richardson
The book says that the second argument to LOAD is a function. Yet the dedicated view (.load) is not used unless the function has the suffix .load The example in the book does this, and I see it as well. If I have a function "load_video' and a view load_video.load then I need to use {{=LOAD('def

[web2py] Re: reloading part of the page (components) based on UI events (changes in checkbox, radiobox, etc)

2013-06-06 Thread Anthony
Can you give more details regarding what needs to change and what data needs to be passed to the server when the dropdown is changed? On Thursday, June 6, 2013 1:48:11 AM UTC-4, shartha wrote: > > Is there anyway to reload part of the page, similar to how the LOAD() > function works, when a drop

[web2py] Re: How to disable modifying Email in auth.profile()

2013-06-06 Thread Anthony
Hmm, I don't think I've seen a site that doesn't let you modify your email address. What if the user makes an error when registering or subsequently changes their email address -- they then have to abandon their account and sign up for a new one? On Thursday, June 6, 2013 3:24:44 AM UTC-4, Lio

[web2py] Re: Remember me with custom or alternate login?

2013-06-06 Thread Anthony
Please show your code. On Thursday, June 6, 2013 12:53:30 AM UTC-4, Mark Li wrote: > > Does anyone know why the session.auth.remember and session.auth.expiration > are only saved after a new page load? > > Currently, I am making an ajax call that sets session.auth.remember and > session.auth.exp

Re: [web2py] reloading part of the page (components) based on UI events (changes in checkbox, radiobox, etc)

2013-06-06 Thread Vinicius Assef
Your lattitude and longitude variables should be filled by javascript. So you could use a normal ajax call. On Thu, Jun 6, 2013 at 2:48 AM, shartha wrote: > Is there anyway to reload part of the page, similar to how the LOAD() > function works, when a dropdown menu is change? > I can't use simple

[web2py] Re: apache-modwsgi problem

2013-06-06 Thread Niphlod
that just seems to be the version check that admin does when you load the main page. are you sure that is an error you WANT to "patch"? Il giorno giovedì 6 giugno 2013 08:48:14 UTC+2, Johann Spies ha scritto: > > I get this regularly in my apache error.log on a server that gets very > few http-c

Re: [web2py] db.table.var(1) += 1 (feature request?)

2013-06-06 Thread Niphlod
+1 but only if var has a default=0 condition. If not - not tested - db(db.table.id == 1).update(var = db.table.var.coalesce_zero() + 1) should do the trick. Il giorno giovedì 6 giugno 2013 09:30:37 UTC+2, Marin Pranjić ha scritto: > > Try this: > > db(db.table.id == 1).update(var = db.table.va

Re: [web2py] How to disable modifying Email in auth.profile()

2013-06-06 Thread 冷春辉
Thanks Martin, it's a easy solution. On Jun 6, 2013 3:38 PM, "Marin Pranjić" wrote: > With this line you will disable edit of email field: > db.auth_user.email.writable = False > > Email will still be printed in form but read only. > > You can remove it completely from form by adding: > > db.auth

Re: [web2py] How to disable modifying Email in auth.profile()

2013-06-06 Thread Marin Pranjić
With this line you will disable edit of email field: db.auth_user.email.writable = False Email will still be printed in form but read only. You can remove it completely from form by adding: db.auth_user.email.readable = False You should put this lines conditionally, for example in default.py us

Re: [web2py] db.table.var(1) += 1 (feature request?)

2013-06-06 Thread Marin Pranjić
Try this: db(db.table.id == 1).update(var = db.table.var + 1) Marin On Thu, Jun 6, 2013 at 9:12 AM, Robin Manoli wrote: > I wonder about the most convenient way to increase an integer value, or > append to a varchar. Is it possible in python to assign operators, such as: > *db.table.var(1) +=

[web2py] How to disable modifying Email in auth.profile()

2013-06-06 Thread Lio
Hello guys, In my app I use email as login user name, but I found in app/default/user/profile the email can be modified. This seems to be a risk either the user may lose his account by accidentally change email or hacked by others in some way. The solution I can think of is customize the profil

[web2py] db.table.var(1) += 1 (feature request?)

2013-06-06 Thread Robin Manoli
I wonder about the most convenient way to increase an integer value, or append to a varchar. Is it possible in python to assign operators, such as: *db.table.var(1) += 1 # increase the value of row 1 of table with 1* Otherwise, web2py could have an increase method for integer columns, and append