[web2py] Re: bug in IS_NOT_EMPTY() validator?
Yes, Anthony you are right, there is no need to for more validators. Was just thinking of a different naming convention to clear the ambiguity we have now, because for checkboxes IS_NOT_EMPTY() means the same as IS_EQUAL_TO(True). Unfortunately, I don't think there is a way to achieve the behaviour I am looking for without adding some JavaScript on the client side when the form is generated in order to create a distinction between value not submitted (which is what the IS_NOT_EMPTY() would use) and False. Thanks, Francisco On Thursday, 4 December 2014 16:23:35 UTC, Anthony wrote: > > I'm not sure I follow. What would an IS_CHECKED validator do? If the > purpose is to ensure a box is checked, then you can already use > IS_EQUAL_TO(True). But that's not the behavior you were looking for. You > wanted the validation to succeed whether or not the box was checked, and > the problem there is not with the validator but with the value that is > passed to the validator when the box is not checked. It's not clear how a > new validator would help here, as such a validator would be completely > superfluous. > > Anthony > > On Thursday, December 4, 2014 8:12:17 AM UTC-5, Francisco Ribeiro wrote: >> >> Anthony, >> this is what I'm doing now. I am aware of that, the problem starts on the >> interpretation given to the request sent by the browser for checkboxes for >> these fields which I thought it should be if it is toggled means True, if >> not it means False. I do understand however that for most scenarios the >> current interpretation is more useful. The alternative would be to add a >> validator called "IS_CHECKED()" to include the distinction missing. >> >> Thank you, >> Francisco >> >> On Thursday, 4 December 2014 12:30:01 UTC, Anthony wrote: >>> >>> Note, the problem is not with the validator -- if you pass it the value >>> False, it will successfully validate. The issue is that when a checkbox is >>> not checked, the browser sends nothing back for that form field (it does >>> not send back a value of False), so the value passed to the validator ends >>> up being None rather than False. >>> >>> In your case, just change your code slightly so the validator doesn't >>> get assigned in the case of boolean fields. Assuming you have the field >>> type stored somehow: >>> >>> if is_required and type != 'boolean': >>> >>> Or better yet, just set is_required to False for boolean fields. >>> >>> Anthony >>> >>> On Thursday, December 4, 2014 7:00:00 AM UTC-5, Francisco Ribeiro wrote: Kiran, I did not assign the default value of False explicitly but implicitly since it's already the default. Anthony, I understand the interpretation currently in place but if you think about this, validators are supposed to accept allowed values *first* and reject all others. True and False are the allowed values here and must have precedence to be accepted. Checkboxes are UIs for boolean types, so an unticked box means False, it does not mean NULL. On my scenario I have a dynamically generated form using SQLFORM.factory() where one my attributes for each form field is "is_required". So these things are stored on the DB, defining how the form should be generated and the way I was handling it was by adding the IS_NOT_EMPTY() validator to the form field if has the parameter is_required == True on its definition. It works fine for all other input fields tested where IS_NOT_EMPTY() makes sense but checkboxes broke it. Kind regards, Francisco On Thursday, 4 December 2014 11:48:04 UTC, Anthony wrote: > > If a boolean widget can only be true or false and never empty, then > there is no need for this validator to begin with, so just remove it. Are > you suggesting that the validator itself should be changed to always > return > success for booleans? If so, what would be the point? > > Anthony -- 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 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/d/optout.
[web2py] Re: docker
I don't really use docker but skimming trough their documentation I'm guessing some problem here https://docs.docker.com/articles/networking/#binding-container-ports-to-the-host -- 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 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/d/optout.
[web2py] Re: bug in IS_NOT_EMPTY() validator?
On Friday, December 5, 2014 4:21:20 AM UTC-5, Francisco Ribeiro wrote: > > Yes, Anthony you are right, there is no need to add more validators. I was > just thinking of a different naming convention to clear the ambiguity we > have now, because for checkboxes IS_NOT_EMPTY() means the same as > IS_EQUAL_TO(True). > Slight correction -- it would actually be IS_EQUAL_TO('on'), as "on" is the standard value given to checkbox input elements in SQLFORMs. > Unfortunately, I don't think there is a way to achieve the behaviour I am > looking for without adding some JavaScript on the client side when the form > is generated in order to create a distinction between value not submitted > (which is what the IS_NOT_EMPTY() would use) and False. > Yes, you could achieve the behavior you want with a special validator that returns success whether it is fed "on" or None, but such a validator would be pointless. Keep in mind, though, that there is not actually any distinction to be made on the client side -- "value not submitted" is literally the exact same thing as False (i.e., when the checkbox is checked, the input element's value is submitted, and when it is not checked, no value is submitted). Of course, you could use Javascript to detect when the form is being submitted, and in that case intercept the form submission, serialize the form elements, and add the checkbox name with a value such as "off", which would result in a value always being submitted for the checkbox (still, though, there would be no distinction between "off" and value not submitted). In that case, IS_NOT_EMPTY() would work as you would like it to, but it would serve no purpose, as it would always generate a successful validation. Much simpler just to remove the is_required attribute from boolean fields. Note, the issue is not with the IS_NOT_EMPTY validator, which works exactly as it should. The issue is with the _validate method of the INPUT helper. For checkbox inputs, it uses request.vars.get(name) to retrieve the value of the checkbox element, and that returns None if the checkbox wasn't checked (i.e., the checkbox variable is not in request.vars in that case). If instead it used something like request.vars.get(name, 'off'), everything would work as you expected (though SQLFORM.accepts would also have to be changed to accommodate this). The problem with that approach is that the INPUT element itself can be used outside of SQLFORMs, and there is no obvious standard for an unchecked value, so the best approach is to remain consistent with how the browser works and simply leave the value as missing in case the box is not checked. Anthony -- 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 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/d/optout.
Re: [web2py] Re: Error handler and request_uri
Submitted ticket 2022. -Jim On Thursday, December 4, 2014 11:08:18 PM UTC-6, Jim S wrote: > > Thanks Anthony. I'll submit a ticket on it tomorrow. Will reference this > discussion. > > Jim > -- 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 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/d/optout.
Re: [web2py] Re: blog post on web2py + db2
Hello Omi, Have you ever tried to install web2py inside iseries using PASE subsistem ? Ruby folks made powerruby, we need power2py? Regards 2011-09-07 19:39 GMT+01:00 Omi Chiba : > Antonio, > > You can contact me personally to solve the issue because it's really a > setting on your AS400. Are you AS400 guy ? If so, you can send me the > screen shot for the following. > > WRKOBJ QSYS/MYLIB > Opt 2=Edit authority > > By default, *public shulld be *CHANGE and authorization list = *NONE. > > If you're secofr, you can also connect with QSECOFR. > > > > On Sep 7, 9:18 am, Jim Steil wrote: > > No journaling is required if you change the commit mode to Commit > > Immediate (*NONE) as shown in the blog post. > > > > -Jim > > > > On 9/7/2011 9:06 AM, DenesL wrote: > > > > > > > > > > > > > > > > > If I remember correctly from my tests a couple of years ago, the AS400 > > > for some reason wants to journal the files (tables) created thru ODBC. > > > No journal is required when reading from existing tables. > > > > > Looking at the files in my WEB2PY library I see a data area specifying > > > the name of the journal: > > > > > Data area . . . . . . . : QDFTJRN > > >Library . . . . . . . : WEB2PY > > > Type . . . . . . . . . : *CHAR > > > Length . . . . . . . . : 100 > > > Text . . . . . . . . . : > > > > > Value > > > Offset *...+1+2+3+4+5 > > > 0 'WEB2PYQDFTJRN *FILE ' > > > 50 ' ' > > > > > and the journal and journal receiver files: > > > > > Object Type Library > > > QDFTJRNRCV *JRNRCV WEB2PY > > > QSQJRNRCV *JRNRCV WEB2PY > > > QDFTJRN *JRN WEB2PY > > > QSQJRN *JRN WEB2PY > > > QDFTJRN *DTAARA WEB2PY > > > > > Obviously your user has to be authorized to use these objects. > > > Hope it helps, > > > Denes. > > > > > On Sep 7, 7:07 am, Ant nio Ramos wrote: > > >> ProgrammingError: ('42000', '[42000] [IBM][Controlador ODBC do iSeries > > >> Access][DB2 UDB]SQL0551 - Not authorized to object AUTH_USER in MYLIB > type > > >> *FILE. (-551) (SQLExecDirectW)') > > > > >> 2011/9/7 Omi Chiba > > > > How about using auth with as400 users. Is it possible? > > >>> I'm not sure about it since I'm still new for web2py but your problem > > >>> should be related to the permission just like your error says. > > >>> My library is like... > > >>> Object secured by authorization list . . . . . . . . . . . . > > >>> *NONE > > >>> Object > > >>> UserGroup > > >>> Authority > > >>> *PUBLIC > > >>> *CHANGE > > >>> QSECOFR > > >>> *ALL > > >>> and my user has... > > >>> Special authority . . . . . . . SPCAUT *ALLOBJ > > >>> Maybe create new library and connect with the most high authority > user > > >>> might help. > > >>> On Sep 6, 4:49 pm, Ant nio Ramos wrote: > > Ok, seems to get someting now. > > I have to change in AS400 the permissions to allow my username to > create > > >>> a > > table > > ProgrammingError: ('42000', '[42000] [IBM][Controlador ODBC do > iSeries > > Access][DB2 UDB]SQL0551 - Not authorized to object in *N type > > >>> *USRPRF. > > (-551) (SQLExecDirectW)') > > How about using auth with as400 users. Is it possible? > > Thank you > > Em 6 de setembro de 2011 22:07, Ant nio Ramos > escreveu: > > > I tried the DAL Example and i could not connect to my AS400 > > > does the DAL only works with db2 on windows or linux? > > > i have my db2 in a OS400 machine > > > Thank you > > > Ant nio > > > Em 6 de setembro de 2011 21:56, Ant nio Ramos > escreveu: > > > Great > > >> i tested the example from the python shell and i connected to my > > >>> company > > >> AS400 with success. > > >> FANTASTIC > > >> Tomorrow i will kick the ass of the RPG guy. > > >> :) > > >> 2011/9/6 Massimo Di Pierro > > >>> > http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-p... > -- 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 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/d/optout.
Re: [web2py] Re: blog post on web2py + db2
+1 to that! -Jim On Friday, December 5, 2014 9:22:22 AM UTC-6, Ramos wrote: > > Hello Omi, > > Have you ever tried to install web2py inside iseries using PASE subsistem ? > > Ruby folks made powerruby, we need power2py? > > Regards > > > > 2011-09-07 19:39 GMT+01:00 Omi Chiba >: > >> Antonio, >> >> You can contact me personally to solve the issue because it's really a >> setting on your AS400. Are you AS400 guy ? If so, you can send me the >> screen shot for the following. >> >> WRKOBJ QSYS/MYLIB >> Opt 2=Edit authority >> >> By default, *public shulld be *CHANGE and authorization list = *NONE. >> >> If you're secofr, you can also connect with QSECOFR. >> >> >> >> On Sep 7, 9:18 am, Jim Steil wrote: >> > No journaling is required if you change the commit mode to Commit >> > Immediate (*NONE) as shown in the blog post. >> > >> > -Jim >> > >> > On 9/7/2011 9:06 AM, DenesL wrote: >> > >> > >> > >> > >> > >> > >> > >> > > If I remember correctly from my tests a couple of years ago, the AS400 >> > > for some reason wants to journal the files (tables) created thru ODBC. >> > > No journal is required when reading from existing tables. >> > >> > > Looking at the files in my WEB2PY library I see a data area specifying >> > > the name of the journal: >> > >> > > Data area . . . . . . . : QDFTJRN >> > >Library . . . . . . . : WEB2PY >> > > Type . . . . . . . . . : *CHAR >> > > Length . . . . . . . . : 100 >> > > Text . . . . . . . . . : >> > >> > > Value >> > > Offset *...+1+2+3+4+5 >> > > 0 'WEB2PYQDFTJRN *FILE ' >> > > 50 ' ' >> > >> > > and the journal and journal receiver files: >> > >> > > Object Type Library >> > > QDFTJRNRCV *JRNRCV WEB2PY >> > > QSQJRNRCV *JRNRCV WEB2PY >> > > QDFTJRN *JRN WEB2PY >> > > QSQJRN *JRN WEB2PY >> > > QDFTJRN *DTAARA WEB2PY >> > >> > > Obviously your user has to be authorized to use these objects. >> > > Hope it helps, >> > > Denes. >> > >> > > On Sep 7, 7:07 am, Ant nio Ramos wrote: >> > >> ProgrammingError: ('42000', '[42000] [IBM][Controlador ODBC do >> iSeries >> > >> Access][DB2 UDB]SQL0551 - Not authorized to object AUTH_USER in >> MYLIB type >> > >> *FILE. (-551) (SQLExecDirectW)') >> > >> > >> 2011/9/7 Omi Chiba >> > >> > How about using auth with as400 users. Is it possible? >> > >>> I'm not sure about it since I'm still new for web2py but your >> problem >> > >>> should be related to the permission just like your error says. >> > >>> My library is like... >> > >>> Object secured by authorization list . . . . . . . . . . . . >> > >>> *NONE >> > >>> Object >> > >>> UserGroup >> > >>> Authority >> > >>> *PUBLIC >> > >>> *CHANGE >> > >>> QSECOFR >> > >>> *ALL >> > >>> and my user has... >> > >>> Special authority . . . . . . . SPCAUT *ALLOBJ >> > >>> Maybe create new library and connect with the most high authority >> user >> > >>> might help. >> > >>> On Sep 6, 4:49 pm, Ant nio Ramos wrote: >> > Ok, seems to get someting now. >> > I have to change in AS400 the permissions to allow my username to >> create >> > >>> a >> > table >> > ProgrammingError: ('42000', '[42000] [IBM][Controlador ODBC do >> iSeries >> > Access][DB2 UDB]SQL0551 - Not authorized to object in *N type >> > >>> *USRPRF. >> > (-551) (SQLExecDirectW)') >> > How about using auth with as400 users. Is it possible? >> > Thank you >> > Em 6 de setembro de 2011 22:07, Ant nio Ramos> > escreveu: >> > > I tried the DAL Example and i could not connect to my AS400 >> > > does the DAL only works with db2 on windows or linux? >> > > i have my db2 in a OS400 machine >> > > Thank you >> > > Ant nio >> > > Em 6 de setembro de 2011 21:56, Ant nio Ramos< >> ramstei...@gmail.com >> > escreveu: >> > > Great >> > >> i tested the example from the python shell and i connected to my >> > >>> company >> > >> AS400 with success. >> > >> FANTASTIC >> > >> Tomorrow i will kick the ass of the RPG guy. >> > >> :) >> > >> 2011/9/6 Massimo Di Pierro >> > >>> >> http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-p... >> > > -- 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 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/d/optout.
[web2py] Re: Code that must run only once
I'm pretty sure there isn't anything that continues to run on your web2py server after your request is fulfilled. So what would be the point? You'd be running it every time anyway. On Tuesday, December 2, 2014 2:50:24 PM UTC-7, Alan Evangelista wrote: > > Where should I put code that should run only once at web server startup > (not once per http request) (eg application initialization) ? > > Thanks in advance! > -- 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 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/d/optout.
[web2py] One app to authenticate them all?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Please, consider this use case scenario: - - A web2py server with several apps: 'master', 'app_a', 'app_b', 'app_c', ... - - Each user may have access to more then one app Ideally (?) users should authenticate in 'master' and then choose one of the apps they have access to which would use 'master' database for user authentication. Example: User 'alice' has access to 'app_a' and 'app_c'. After login, she is prompted with a list of apps she has access to (a + c). She chooses 'app_c' and is redirected to app without the need to login (again) in the app. Is there any way to avoid the (second) login in the targeted app? I know I could use a different database for Auth(), but don't know if it's even possible to avoid the last login. Thanks, - -- Carlos Correia = MEMÓRIA PERSISTENTE Tel.: 219 291 591 - GSM: 917 157 146 / 967 511 762 e-mail: ge...@memoriapersistente.pt - URL: http://www.memoriapersistente.pt Jabber: m...@jabber.org GnuPG: wwwkeys.eu.pgp.net (NOVA) URL Suporte: https://t5.m16e.com/gps -BEGIN PGP SIGNATURE- Version: GnuPG v1 iQIcBAEBAgAGBQJUgf0fAAoJEMmo8B8WFGV2yqYP/0sUEuZ7Nh/rk+Mj7By5hFaG U0efQ6sr/CPdw1B44AQlhhY3uIxv83cum9C8SGLg8zEBBodSCtPo/ryGaFh6j0hE ENPSMX6qOXc4fRwsK0G5uAVAsL8DeIKCE3JMxnR3LPbnpjOF4CSsh1pwW+q8Ftk4 nSgyGG4z438ZL9W2pXRQ1XHTfsDmj4i/R1v7mbH/COQ+w+XSqawRljcw8/0eeile d/qo86g1vrSRP74Pvh+dlhNanpfxT/WxNu7s9jg9W8aLxceczmVkaTaw+l89GlZd L1azOxErhLC+1LTcBsLUiIhlUVoLB+KNJhAhGOx7p+i3Sm5k5CGV7sOV3pGyw/OE XeVtYY0skUCsWCvLg9zwKxwRHXzOMr0Leyt8y6ee1S++kji/2ULP5WDLd+oeVr4J 48wpp5LgSJt5Y1CgYttZ3p8NuZhB+fYEyDhtjcLGxSP9jG1+Ul5277Nu8ImDIilZ IVT4EAif8bVPuJXHqO/DvkIOodUTg7Cz3YWeG6GDENhgM+8sA0LUKx86zyAfWir+ czE/bfNMIPvNYFpbO6MAmlSVD/VWQ8gQrljtqdJCsMdwzDvLjlz+80nr1L8PkUPp PBkRvLgx6BRic2+7XJSj6QCV+aaP2tq784aJDdiJF0XPze237NF2LeWGkykN6L4p IpNCcH6NxfOS2vu6R8Vk =o0BX -END PGP SIGNATURE- -- 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 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/d/optout.
[web2py] Re: Consent Form
On Wednesday, December 3, 2014 6:49:02 PM UTC-8, smriti7545 wrote: > > I have submitted my parental consent form and ID proof but only id proof > has been verified. Can u tell me that are all my forms verified or not. > This group doesn't handled parental consent forms (that I know of), but perhaps some of the applications built by group members do. You should ask the organization you submitted the forms to for the status. /dps -- 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 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/d/optout.
[web2py] Re: How to use crud.select(db, query) to extract values in db table
On Wednesday, December 3, 2014 8:25:31 PM UTC-8, Gideon George wrote: > > [model, controller skipped] > View > > I rep {{=lga}}, {{=state}} State. By {{=name}} > lives in {{=location}} on {{=how can I show the time here?}} > What time do you want to show? The only time in your model is the posted field. If you're using that, the default is for the DAL to return that as a string in ISO 8601 format. If you want to use the current time (which will change each time the page is accessed), then you can either use datetime.datetime.now() in your controller (and thus use server time) (you use the value to add an extra item to the dictionary your controller returns), or use javascript to access the time on the user's computer. If the time is coming from another source, then you would need to understand what form that value is in, and how to convert it to the correct string format. /dps -- 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 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/d/optout.
[web2py] Re: How to use crud.select(db, query) to extract values in db table
This was already answered for you on Quora: http://www.quora.com/How-can-I-use-crud-select-DB-query-to-extract-values-in-a-DB-table-in-Web2py/answer/Anthony-Bastardi On Wednesday, December 3, 2014 11:25:31 PM UTC-5, Gideon George wrote: > > This is my db > db = DAL('sqlite://storage.sqlite') > db.define_table('entry', > Field('name'), > Field('location'), > Field('state_of_origin'), > Field('local_govt'), > Field('file', 'upload'), > Field('posted_on','datetime',readable=False,writable=False) > ) > > > I want to extract only the values from my db table called "entry" using > crud. I understand i have to do this > name = crud.select(db.entry, query) > > But because i don't know the fomular for extracting the query, I did this > name = crud.select(db.entry, fields=['name']) > I got the fields with the values as result. > > I just want the values only! Please help me with the formular for getting > each of the values in my table using query. > > Action Controller > > def zone(): > db.entry.posted_on.default = request.now > form=crud.create(db.entry, next=URL('zone'), message=T('Record > created')) > name = crud.select(db.entry, fields=['name']) > location = crud.select(db.entry, fields=['location']) > state = crud.select(db.entry, fields=['state_of_origin']) > lga = crud.select(db.entry, fields=['local_govt']) > image = crud.select(db.entry, fields=['file']) > > View > > I rep {{=lga}}, {{=state}} State. By {{=name}} > lives in {{=location}} on {{=how can I show the time here?}} > > ABOVE IS EXACTLY HOW I WANT IT TO APPEAR. > -- 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 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/d/optout.
[web2py] How to split the work between HTML designers and programmers using web2py?
I've been reading this post about "how do larger teams work with web2py" https://groups.google.com/forum/#!searchin/web2py/team$20work/web2py/hdDPtxOmqyA/Vln888ii1GcJ But my question is a little bit different, because it's not about the team size; but about the tasks of programmers and html designers. Specifically, I've a web2py app (that is, the models, controllers). Now I want to make a lot of different "templates" for that app, because I want the posibility to choose the template that the app will use once installed. so when the app is installed, the client can choose the template he likes it more. So, the controllers remain the same, they don't change, every controller has its functions and every function returns some dict to the corresponding view. ¿How can I do if I need to hire a html designer to render the view? The html designer only knows html, and doesn't have to know python or web2py's template langage. So I'm stucked here. I thought about letting the html designer work separately with the html, css and javascript, however, when his work is done, I would have to adapt it to web2py's template language. ¿Is there anybody who came across the same question? ¿Does anyone has a suggestion about an approach? Thanks in advance. -- 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 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/d/optout.
[web2py] Re: One app to authenticate them all?
Have you tried this: http://web2py.com/books/default/chapter/29/09/access-control#Central-Authentication-Service Anthony On Friday, December 5, 2014 1:45:17 PM UTC-5, Carlos Correia wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > Please, consider this use case scenario: > > - - A web2py server with several apps: 'master', 'app_a', 'app_b', > 'app_c', ... > - - Each user may have access to more then one app > > Ideally (?) users should authenticate in 'master' and then choose one of > the > apps they have access to which would use 'master' database for user > authentication. > > Example: > > User 'alice' has access to 'app_a' and 'app_c'. > After login, she is prompted with a list of apps she has access to (a + > c). > She chooses 'app_c' and is redirected to app without the need to login > (again) > in the app. > > Is there any way to avoid the (second) login in the targeted app? > > I know I could use a different database for Auth(), but don't know if it's > even > possible to avoid the last login. > > Thanks, > - -- > > Carlos Correia > = > MEMÓRIA PERSISTENTE > Tel.: 219 291 591 - GSM: 917 157 146 / 967 511 762 > e-mail: ge...@memoriapersistente.pt - URL: > http://www.memoriapersistente.pt > Jabber: m...@jabber.org > GnuPG: wwwkeys.eu.pgp.net (NOVA) > URL Suporte: https://t5.m16e.com/gps > -BEGIN PGP SIGNATURE- > Version: GnuPG v1 > > iQIcBAEBAgAGBQJUgf0fAAoJEMmo8B8WFGV2yqYP/0sUEuZ7Nh/rk+Mj7By5hFaG > U0efQ6sr/CPdw1B44AQlhhY3uIxv83cum9C8SGLg8zEBBodSCtPo/ryGaFh6j0hE > ENPSMX6qOXc4fRwsK0G5uAVAsL8DeIKCE3JMxnR3LPbnpjOF4CSsh1pwW+q8Ftk4 > nSgyGG4z438ZL9W2pXRQ1XHTfsDmj4i/R1v7mbH/COQ+w+XSqawRljcw8/0eeile > d/qo86g1vrSRP74Pvh+dlhNanpfxT/WxNu7s9jg9W8aLxceczmVkaTaw+l89GlZd > L1azOxErhLC+1LTcBsLUiIhlUVoLB+KNJhAhGOx7p+i3Sm5k5CGV7sOV3pGyw/OE > XeVtYY0skUCsWCvLg9zwKxwRHXzOMr0Leyt8y6ee1S++kji/2ULP5WDLd+oeVr4J > 48wpp5LgSJt5Y1CgYttZ3p8NuZhB+fYEyDhtjcLGxSP9jG1+Ul5277Nu8ImDIilZ > IVT4EAif8bVPuJXHqO/DvkIOodUTg7Cz3YWeG6GDENhgM+8sA0LUKx86zyAfWir+ > czE/bfNMIPvNYFpbO6MAmlSVD/VWQ8gQrljtqdJCsMdwzDvLjlz+80nr1L8PkUPp > PBkRvLgx6BRic2+7XJSj6QCV+aaP2tq784aJDdiJF0XPze237NF2LeWGkykN6L4p > IpNCcH6NxfOS2vu6R8Vk > =o0BX > -END PGP SIGNATURE- > -- 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 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/d/optout.
[web2py] Re: Code that must run only once
How are you starting the server? On Tuesday, December 2, 2014 4:50:24 PM UTC-5, Alan Evangelista wrote: > > Where should I put code that should run only once at web server startup > (not once per http request) (eg application initialization) ? > > Thanks in advance! > -- 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 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/d/optout.
Re: [web2py] Re: Web2py's included connection pooling VS external pooling software
I've made this change to one of the apps. I'll be testing with other > apps in the next days. To get it running I had to import "fcgi_fork" > from flup.server instead of simple "fcgi". > > I know this subject is way away from this group, but I'm tempted to > ask, given the quality of the info I've received here. If I setup an > app with more minspare and maxspare children than other, ¿would this > mean that the app will have more resources assigned than the other > app? > > This is a question that I'm asking since a while: how do I limit the > server resources used by every app (that is, accordingly to the "plan" > every client has paid for his app). I've already limited network > bandwidth for every app, and recently I was able to limit the > connections to the database for every app. > > So, if I assign more spare children to an app, ¿would it be that the > app is being assigned with more CPU? > > I would say no unless you have a number of CPU >= total number of possible processes from all app. That would be a really large server! minspare, maxspare are two bounds that you need to shape based on the physical resources at disposal and the need to make the app responsive. Spares stay idle but ready to answer to new requests, the more you have the better is responsiveness under variable loads. But idle processes consume memory, while running processes also consume CPU time. If you have 4 cores, you will have no more than 4 processes running in any unit of time. The O.S. kernel will try to manage all the processes requesting to run by assigning them to a CPU, by various criteria, the fact is that each time the CPU has to switch from one process to another (context switching) it has to do a lot of work. So having too many processes in the run queue compared to the number of CPUs, makes the system waste much of it's time in context switching. To assign different priorities to each application, minspare, maxspare are only a little part of a complex problem. Lighttpd can help by managing the network traffic across applications, the Linux (BSD too!) kernel has many options, to enforce limits and priorities on resource usage to a single or a group processes. The literature about this is overwhelming :-) -- 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 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/d/optout.