[web2py:36112] Re: SQLForm (set custom css classes to specified elements)
Why do you need classes to style the default widgets? They are very simple, they basically just have an INPUT so you can do form['_class']='myclass' .myclass INPUT#name { ... style of the INPUT in the widget name in form... } There is nothing you cannot already do in CSS. Massimo On Nov 27, 11:19 pm, waTR wrote: > That sounds like it might work. I will look into it. > > Re: jQuery > It becomes very messy when you have to do that. It is fine when the > developer does the design and coding, but when working in a team you > can't do that. You need to have a system in place where you have to do > minimal modification/additional code to make the design work with the > already enormous amounts of logic code. > > It should be built into the SQLFORM widget object. It doesn't seem so > complicated to do. I will look into it and see. > > Though I am not intending to do anything that would affect backward > compatibility here, this is rather a simple modification of what is > already there and maybe add an additional optional field that takes a > dictionary to modify the dictionary created by SQLFORM.custom.widget > > On Nov 27, 5:58 pm, Thadeus Burgess wrote: > > > Try actually overriding the form widgets. > > > So you can override SQLFORM.widgets dictionary with your custom ones that > > define your own classes. > > > You can see example widgets on web2pyslices.com for this purpose. > > > -Thadeus > > > On Fri, Nov 27, 2009 at 7:35 PM, mdipierro wrote: > > > I am not sure this is a good idea. It is not necessary for the purpose > > > of customization > > > Moreover you can do it with jQuery > > > > jQuery('#table_password').addCladd('custom_1'); > > > > On Nov 27, 6:55 pm, waTR wrote: > > > > I am wondering if anyone is working on adding a capability to set a > > > > class for a single element in an SQLForm.custom.widget out of however > > > > many are passed to it from a db.table. I.e. > > > > > You have a table named USER with Name, Email, Password. > > > > Set Name to class = "password OR string OR whatever is > > > > default + custom_1 custom_2 custom_n". In addition, would be nice > > > > to have access to size="" of as well. > > > > > If no one is working on anything like this, I am interested in taking > > > > a stab into this darkness... > > > > > Let me know if no one is working on this and I will put forward my > > > > proposed design modification (in english, not code). If there is no > > > > cries of outrage I will get it coded. Otherwise, I guess I might just > > > > do it for my local copy only. I really need this facility to speed up > > > > my forms creation--my app has a hundred or so, and all the CSS has > > > > been done by an outside designer. I really don't want to modify his > > > > design or CSS links. I just want to be able to plug the Input fields > > > > and have the form start working. > > > > -- > > > > You received this message because you are subscribed to the Google Groups > > > "web2py-users" group. > > > To post to this group, send email to web...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > web2py+unsubscr...@googlegroups.com > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36113] Re: new on web2pyslices.com: concurrent RPX and web2py auth
I am having problems displaying profile data =db.profile.provider and =db.profile.pic_url I cannot get it to work and must be syntax problem, I have tried for instance auth.provider but gives value=none. Any ideas appreciated chrism On Nov 21, 1:33 pm, murray3 wrote: > scratch that!!! > I had the full url to auth.settings.rpx_login_domain='http://localhost: > 8000'/init/default/index', should have been just 'http://localhost: > 8000' > Thanks again guy's for this code:) > > On Nov 21, 12:41 pm, murray3 wrote: > > > I have tried the rpxAuth module and it allowed me to login using a > > google account. > > Did not get auth.user when calling from web2py. > > > I decided to try the original prxAuth module which does not allow for > > local login and I have the same problem. > > > I have been looking at this for a few hours and not sure what to to, > > it logs me in and the google account name is displayed in therpxnow > > iframe, but beyond that the web2py auth code does not seem have been > > passed the required data. > > > Maybe this is a common problem and there are some settings which I > > have missed but I followed the example code and looked through the > > rpxauth module and I thought I had the correct settings? > > > Any ideas /Help appreciated. > > > chrism -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36114] Re: new on web2pyslices.com: concurrent RPX and web2py auth
If you need custom fields you have to create a custom auth table first then create a mapping in the RPXAuth instance. I hope that makes sense. Feel free to email me your code and I will take a closer look. On Nov 28, 3:13 am, murray3 wrote: > I am having problems displaying profile data =db.profile.provider and > =db.profile.pic_url > I cannot get it to work and must be syntax problem, I have tried for > instance auth.provider > but gives value=none. > Any ideas appreciated > chrism > > On Nov 21, 1:33 pm, murray3 wrote: > > > scratch that!!! > > I had the full url to auth.settings.rpx_login_domain='http://localhost: > > 8000'/init/default/index', should have been just 'http://localhost: > > 8000' > > Thanks again guy's for this code:) > > > On Nov 21, 12:41 pm, murray3 wrote: > > > > I have tried the rpxAuth module and it allowed me to login using a > > > google account. > > > Did not get auth.user when calling from web2py. > > > > I decided to try the original prxAuth module which does not allow for > > > local login and I have the same problem. > > > > I have been looking at this for a few hours and not sure what to to, > > > it logs me in and the google account name is displayed in therpxnow > > > iframe, but beyond that the web2py auth code does not seem have been > > > passed the required data. > > > > Maybe this is a common problem and there are some settings which I > > > have missed but I followed the example code and looked through the > > > rpxauth module and I thought I had the correct settings? > > > > Any ideas /Help appreciated. > > > > chrism -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36115] domain hostname in routes.py
Hello, I want to run one web2py instance where each web2py application will be mapped to different domain and with ability to map some urls differently in different domains. I tried to edit routes.py but without success. Can anyone show examples of such routes.py? Thanks. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36116] Re: domain hostname in routes.py
You can but strongly suggest you use virtual hosts in apache + mod_wsgi + mod_rewrite. It will give you more flexibility in the long run. Massimo On Nov 28, 10:31 am, Alex wrote: > Hello, > > I want to run one web2py instance where each web2py application > will be mapped to different domain and with ability to map some urls > differently in different domains. > > I tried to edit routes.py but without success. > > Can anyone show examples of such routes.py? > > Thanks. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36117] Re: domain hostname in routes.py
Actually i'm using nginx with mod_proxy This helped me with nginx for incoming requests: rewrite ^(.*)$ /domain_app_name$1 last; but how to change "out" url generation to do not include app name "domain_app_name" in all links? On Nov 28, 6:48 pm, mdipierro wrote: > You can but strongly suggest you use virtual hosts in apache + > mod_wsgi + mod_rewrite. It will give you more flexibility in the long > run. > > Massimo > > On Nov 28, 10:31 am, Alex wrote: > > > > > Hello, > > > I want to run one web2py instance where each web2py application > > will be mapped to different domain and with ability to map some urls > > differently in different domains. > > > I tried to edit routes.py but without success. > > > Can anyone show examples of such routes.py? > > > Thanks. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36118] Re: SQLForm (set custom css classes to specified elements)
The reason is he had a outsourced designer make all of the stylesheets. He would have to either rewrite those stylesheets to accommodate web2py, or change web2py to accommodate those spreadsheets. From the sound of it, there are tons of form spreadsheets and would be quite tedious to alter them. This is where having the ability to customize css attributes during form creation would be "nice". -Thadeus On Sat, Nov 28, 2009 at 3:07 AM, mdipierro wrote: > Why do you need classes to style the default widgets? > They are very simple, they basically just have an INPUT so you can do > > form['_class']='myclass' > > .myclass INPUT#name { > ... style of the INPUT in the widget name in form... > } > > There is nothing you cannot already do in CSS. > > Massimo > > > > On Nov 27, 11:19 pm, waTR wrote: > > That sounds like it might work. I will look into it. > > > > Re: jQuery > > It becomes very messy when you have to do that. It is fine when the > > developer does the design and coding, but when working in a team you > > can't do that. You need to have a system in place where you have to do > > minimal modification/additional code to make the design work with the > > already enormous amounts of logic code. > > > > It should be built into the SQLFORM widget object. It doesn't seem so > > complicated to do. I will look into it and see. > > > > Though I am not intending to do anything that would affect backward > > compatibility here, this is rather a simple modification of what is > > already there and maybe add an additional optional field that takes a > > dictionary to modify the dictionary created by SQLFORM.custom.widget > > > > On Nov 27, 5:58 pm, Thadeus Burgess wrote: > > > > > Try actually overriding the form widgets. > > > > > So you can override SQLFORM.widgets dictionary with your custom ones > that > > > define your own classes. > > > > > You can see example widgets on web2pyslices.com for this purpose. > > > > > -Thadeus > > > > > On Fri, Nov 27, 2009 at 7:35 PM, mdipierro > wrote: > > > > I am not sure this is a good idea. It is not necessary for the > purpose > > > > of customization > > > > Moreover you can do it with jQuery > > > > > > jQuery('#table_password').addCladd('custom_1'); > > > > > > On Nov 27, 6:55 pm, waTR wrote: > > > > > I am wondering if anyone is working on adding a capability to set a > > > > > class for a single element in an SQLForm.custom.widget out of > however > > > > > many are passed to it from a db.table. I.e. > > > > > > > You have a table named USER with Name, Email, Password. > > > > > Set Name to class = "password OR string OR whatever is > > > > > default +custom_1 custom_2 custom_n". In addition, would be > nice > > > > > to have access to size="" of as well. > > > > > > > If no one is working on anything like this, I am interested in > taking > > > > > a stab into this darkness... > > > > > > > Let me know if no one is working on this and I will put forward my > > > > > proposed design modification (in english, not code). If there is no > > > > > cries of outrage I will get it coded. Otherwise, I guess I might > just > > > > > do it for my local copy only. I really need this facility to speed > up > > > > > my forms creation--my app has a hundred or so, and all the CSS has > > > > > been done by an outside designer. I really don't want to modify his > > > > > design or CSS links. I just want to be able to plug the Input > fields > > > > > and have the form start working. > > > > > > -- > > > > > > You received this message because you are subscribed to the Google > Groups > > > > "web2py-users" group. > > > > To post to this group, send email to web...@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > web2py+unsubscr...@googlegroups.com > > > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/web2py?hl=en. > > > > > > -- > > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36119] web2py on Apache Tomcat
Is Web2py deployable on Apache tomcat, can anyone help?? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36120] Omit default controller for for any action
Is there any way to omit default controller name in URL if there is appropriate default controller action, like it's done for index action but to work for any default controller action? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36121] Disable registrations
What is the most seem-less way to disable user registration system. In a system where you only need one user and don't want anyone else to join. -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36122] modified plugin_tagging
Hey there I just modified the tagging plugin so multiple users can tag one record, a tag cloud can be displayed for each record, for each table, and for all tags. I did not test it very much, please post improvements! http://www.delarue-berlin.de/tmp/web2py.plugin.tagging.gz -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36123] Plugin Central
Hello everyone, Ok I am putting the finishing touches on our new web2py plugin hosting site. Could everyone take a look at it, let me know what you think, and reply to this thread for any comments or suggestions. I will not get a chance to update it until next weekend, but would love to start gathering a list of things that could be done better. You can start uploading some packed plug-ins to try the site out, however it is just running off the demo SQLITE database, which will be scrubbed when the site goes official. As a note, the plug-ins that are already in the database are test files, and do not actually contain anything. http://plugincentral.thadeusb.com/ Hope you enjoy! Thanks, -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36124] Re: Encoding problem (bug?)
hi Nice! Thank you for the attention. There is a good reason that I'm sure you deeply understand for me to be less connected... I've been finishing my mst. thesis. Work done, presentation finished more time free. Meanwhile, I've been working on some interesting projects including web2py based. I've been digging on this problem and found out the source. It has to do with the lack of encoding definition in the Translation files. I added "#coding: utf8" and it temporarly worked, until I've added a new T() entry in the code which made web2py to rewrite the T files (so it would include the new key) and then the first line gone making the proper encoding go away. this can be considered a fix and it's backward compatible. A nice solution would be to define somewhere an encoding to apply to an application. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. translations_encoding.patch Description: Binary data
[web2py:36125] Re: SQLForm (set custom css classes to specified elements)
Correct. Design is out-sourced to a designer. Logic code is being done by me. Main issue going forward will be with service contracts with outsourced work. It's like voiding a warranty on a hard-drive in your computer if you open it and modify anything. On Nov 28, 9:36 am, Thadeus Burgess wrote: > The reason is he had a outsourced designer make all of the stylesheets. He > would have to either rewrite those stylesheets to accommodate web2py, or > change web2py to accommodate those spreadsheets. From the sound of it, there > are tons of form spreadsheets and would be quite tedious to alter them. > > This is where having the ability to customize css attributes during form > creation would be "nice". > > -Thadeus > > On Sat, Nov 28, 2009 at 3:07 AM, mdipierro wrote: > > Why do you need classes to style the default widgets? > > They are very simple, they basically just have an INPUT so you can do > > > form['_class']='myclass' > > > .myclass INPUT#name { > > ... style of the INPUT in the widget name in form... > > } > > > There is nothing you cannot already do in CSS. > > > Massimo > > > On Nov 27, 11:19 pm, waTR wrote: > > > That sounds like it might work. I will look into it. > > > > Re: jQuery > > > It becomes very messy when you have to do that. It is fine when the > > > developer does the design and coding, but when working in a team you > > > can't do that. You need to have a system in place where you have to do > > > minimal modification/additional code to make the design work with the > > > already enormous amounts of logic code. > > > > It should be built into the SQLFORM widget object. It doesn't seem so > > > complicated to do. I will look into it and see. > > > > Though I am not intending to do anything that would affect backward > > > compatibility here, this is rather a simple modification of what is > > > already there and maybe add an additional optional field that takes a > > > dictionary to modify the dictionary created by SQLFORM.custom.widget > > > > On Nov 27, 5:58 pm, Thadeus Burgess wrote: > > > > > Try actually overriding the form widgets. > > > > > So you can override SQLFORM.widgets dictionary with your custom ones > > that > > > > define your own classes. > > > > > You can see example widgets on web2pyslices.com for this purpose. > > > > > -Thadeus > > > > > On Fri, Nov 27, 2009 at 7:35 PM, mdipierro > > wrote: > > > > > I am not sure this is a good idea. It is not necessary for the > > purpose > > > > > of customization > > > > > Moreover you can do it with jQuery > > > > > > jQuery('#table_password').addCladd('custom_1'); > > > > > > On Nov 27, 6:55 pm, waTR wrote: > > > > > > I am wondering if anyone is working on adding a capability to set a > > > > > > class for a single element in an SQLForm.custom.widget out of > > however > > > > > > many are passed to it from a db.table. I.e. > > > > > > > You have a table named USER with Name, Email, Password. > > > > > > Set Name to class = "password OR string OR whatever is > > > > > > default + custom_1 custom_2 custom_n". In addition, would be > > nice > > > > > > to have access to size="" of as well. > > > > > > > If no one is working on anything like this, I am interested in > > taking > > > > > > a stab into this darkness... > > > > > > > Let me know if no one is working on this and I will put forward my > > > > > > proposed design modification (in english, not code). If there is no > > > > > > cries of outrage I will get it coded. Otherwise, I guess I might > > just > > > > > > do it for my local copy only. I really need this facility to speed > > up > > > > > > my forms creation--my app has a hundred or so, and all the CSS has > > > > > > been done by an outside designer. I really don't want to modify his > > > > > > design or CSS links. I just want to be able to plug the Input > > fields > > > > > > and have the form start working. > > > > > > -- > > > > > > You received this message because you are subscribed to the Google > > Groups > > > > > "web2py-users" group. > > > > > To post to this group, send email to web...@googlegroups.com. > > > > > To unsubscribe from this group, send email to > > > > > web2py+unsubscr...@googlegroups.com > > > > > > > > . > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/web2py?hl=en. > > > -- > > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.
[web2py:36126] Re: Plugin Central
Good job! Lets hope that the plugins will be as good as the repository. Speaking of quality... a rating system would make a nice addition. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36127] Re: new on web2pyslices.com: concurrent RPX and web2py auth
just remembered I am using the original RPXAuth.py from april. There is a table called profile auto created in my project and on inspection I can see the fields for provider, email etc from admin. Just when I try and access them from the view i.e {{=db.profile.provider)) it returns nothing? On Nov 28, 1:50 pm, "mr.freeze" wrote: > If you need custom fields you have to create a custom auth table first > then create a mapping in the RPXAuth instance. I hope that makes > sense. Feel free to email me your code and I will take a closer look. > > On Nov 28, 3:13 am, murray3 wrote: > > > I am having problems displaying profile data =db.profile.provider and > > =db.profile.pic_url > > I cannot get it to work and must be syntax problem, I have tried for > > instance auth.provider > > but gives value=none. > > Any ideas appreciated > > chrism > > > On Nov 21, 1:33 pm, murray3 wrote: > > > > scratch that!!! > > > I had the full url to auth.settings.rpx_login_domain='http://localhost: > > > 8000'/init/default/index', should have been just 'http://localhost: > > > 8000' > > > Thanks again guy's for this code:) > > > > On Nov 21, 12:41 pm, murray3 wrote: > > > > > I have tried the rpxAuth module and it allowed me to login using a > > > > google account. > > > > Did not get auth.user when calling from web2py. > > > > > I decided to try the original prxAuth module which does not allow for > > > > local login and I have the same problem. > > > > > I have been looking at this for a few hours and not sure what to to, > > > > it logs me in and the google account name is displayed in therpxnow > > > > iframe, but beyond that the web2py auth code does not seem have been > > > > passed the required data. > > > > > Maybe this is a common problem and there are some settings which I > > > > have missed but I followed the example code and looked through the > > > > rpxauth module and I thought I had the correct settings? > > > > > Any ideas /Help appreciated. > > > > > chrism -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36128] send a tweet
def twitter_post(username,password,message): import urllib, urlib2, base64, gluon.contrib.simplejson args= urllib.urlencode([('status',message)]) headers={} headers['Authorization'] = 'Basic '+base64.b64encode(username +':'+password) request = urllib2.Request('http://twitter.com/statuses/ update.json', args, headers) return gluon.contrib.simplejson.loads(urllib2.urlopen(req).read ()) Massimo could you offer some example view code to use this function, regards chrism -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36129] Re: Checkboxes display errror on each input, instead of just once for the widget.
The custom categories checkboxes widget I am using for plugincentral is broken. Did you change anything that might effect this? -Thadeus On Sun, Nov 22, 2009 at 8:13 PM, mr.freeze wrote: > > Yes, but having no default means that the user will be required to > actively choose. I like that. Anyway, i'm splitting hairs. Thanks > for the patch. > > On Nov 22, 7:59 pm, mdipierro wrote: > > Because IS_IN_SET(,multiple=False) implies an exclusive choice. In > > this case you must use radio buttons, not checkboxes. > > > > On Nov 22, 6:13 pm, "mr.freeze" wrote: > > > > > It works now. > > > > > > This was wrong to begin with. It is not clear if this should be > > > > > I don't understand. The example is a valid form. The only problem was > > > that it had an error div for each checkbox. Why is it wrong? > > > > > On Nov 22, 5:55 pm, mdipierro wrote: > > > > > > lol. Please check again the code in trunk. Anyway, reading again the > > > > original post... > > > > > > > form = SQLFORM.factory(Field('multiple_options', > requires=IS_IN_SET(('Hi', > > > > > 'Milk', 'Mom', 'Love', 'Santa')), > widget=SQLFORM.widgets.checkboxes.widget)) > > > > > > This was wrong to begin with. It is not clear if this should be > > > > > > form = SQLFORM.factory(Field('multiple_options', requires=IS_IN_SET > > > > (('Hi', > > > > 'Milk', 'Mom', 'Love', 'Santa'),multiple=True), > > > > widget=SQLFORM.widgets.checkboxes.widget)) > > > > > > or > > > > > > form = SQLFORM.factory(Field('multiple_options', requires=IS_IN_SET > > > > (('Hi', > > > > 'Milk', 'Mom', 'Love', 'Santa'),default='Hi'), > > > > widget=SQLFORM.widgets.radio.widget)) > > > > > > none of which should require the patch in trunk. > > > > Only case checkboxes may need to report an error is if one is > > > > tampering with the form or if one is setting weird constraints like > > > > "select any two of the following". > > > > > > Massimo > > > > > > On Nov 22, 5:24 pm, "mr.freeze" wrote: > > > > > > > You fixed it too much :) It doesn't give an error at all now. > > > > > > > On Nov 22, 3:48 pm, mdipierro wrote: > > > > > > > > Can you please check the fix in trunk? > > > > > > > > Massimo > > > > > > > > On Nov 21, 6:51 pm, mdipierro wrote: > > > > > > > > > well' This is a bug. I think the proper fix would be to edit > html.py > > > > > > > and make sure that only checked boxes display the error. > > > > > > > > > On Nov 21, 6:15 pm, "mr.freeze" wrote: > > > > > > > > > > Here's a lame workaround. It's a widget that removes all of > the error > > > > > > > > divs except the last one: > > > > > > > > > > def checkboxes_widget(f,v): > > > > > > > > wrapper = DIV(_id="%s_wrapper" % f.name) > > > > > > > > inp = SQLFORM.widgets.checkboxes.widget(f,v) > > > > > > > > scr = > SCRIPT('jQuery("div[id=\'%s__error\']").slice(0,-1).remove > > > > > > > > ();' % > > > > > > > > f.name,_type="text/javascript") > > > > > > > > wrapper.components.extend([inp,scr]) > > > > > > > > return wrapper > > > > > > > > > > On Nov 21, 3:45 pm, Thadeus Burgess > wrote: > > > > > > > > > > > form = SQLFORM.factory(Field('multiple_options', > requires=IS_IN_SET(('Hi', > > > > > > > > > 'Milk', 'Mom', 'Love', 'Santa')), > widget=SQLFORM.widgets.checkboxes.widget)) > > > > > > > > > > > Submit the form without selecting anything, and it displays > the error > > > > > > > > > message on each INPUT() helper. > > > > > > > > > > > You can also change widget to SQLFORM.widgets.radio.widget > and it will have > > > > > > > > > the same effect. > > > > > > > > > > > -Thadeus > > > > > > > > > > > On Sat, Nov 21, 2009 at 3:35 PM, mr.freeze < > nat...@freezable.com> wrote: > > > > > > > > > > > > Can you post some example code that produces the effect? > Just want to > > > > > > > > > > make sure I'm understanding the problem correctly. > > > > > > > > > > > > On Nov 21, 1:55 pm, Thadeus Burgess < > thade...@thadeusb.com> wrote: > > > > > > > > > > >http://static.thadeusb.com/web2py_checkboxes_fail.png > > > > > > > > > > > > > Pleeaze fix!!! > > > > > > > > > > > > > I have a patch, but it is not backwards-compatible. > > > > > > > > > > > > > Is this an area where it is a bug, or a feature to have > multiple error > > > > > > > > > > > messages for checkboxes/radio widgets? > > > > > > > > > > > > > -Thadeus > > > > > --~--~-~--~~~---~--~~ > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web2py@googlegroups.com > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en > -~--~~~~--~~--~--~--- > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from thi
[web2py:36130] doctesting routes.py
I've implemented a doctest for routes.py. The idea is to modify the doctest as required to verify that your routes.py is doing what you expect. Massimo has the patch, but in the meantime (he's busy) feedback would be useful. Post it here, or send me a note. You'll need to replace gluon/rewrite.py and add the new doctest code to the end of routes.py. These are based on the current svn tree. http://lobitos.net/web2py-patches/gluon/rewrite.py http://lobitos.net/web2py-patches/routes.doctest.py (route.doctest.py is routes.example.py with the new doctest code appended) You'll need to edit the doctest section to reflect your own routes (feel free to add new tests if you need to), and then run the test thus: $ python routes.py If the tests succeed, you'll see no output. If not, it'll tell you what you got vs what it expected. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36131] doctesting routes.py
On Nov 28, 2009, at 4:54 PM, Jonathan Lundell wrote: > I've implemented a doctest for routes.py. The idea is to modify the doctest > as required to verify that your routes.py is doing what you expect. Massimo > has the patch, but in the meantime (he's busy) feedback would be useful. Post > it here, or send me a note. > > You'll need to replace gluon/rewrite.py and add the new doctest code to the > end of routes.py. These are based on the current svn tree. One more thing: needless to say, we're talking about incoming URLs as seen by web2py, so any rewriting that happens externally won't be reflected here. > > http://lobitos.net/web2py-patches/gluon/rewrite.py > http://lobitos.net/web2py-patches/routes.doctest.py > > (route.doctest.py is routes.example.py with the new doctest code appended) > > You'll need to edit the doctest section to reflect your own routes (feel free > to add new tests if you need to), and then run the test thus: > > $ python routes.py > > If the tests succeed, you'll see no output. If not, it'll tell you what you > got vs what it expected. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36132] Re: Checkboxes display errror on each input, instead of just once for the widget.
For the record field.requires.options() You have to call that :) Why is this? -Thadeus On Sat, Nov 28, 2009 at 6:53 PM, Thadeus Burgess wrote: > The custom categories checkboxes widget I am using for plugincentral is > broken. > > Did you change anything that might effect this? > > -Thadeus > > > > > > On Sun, Nov 22, 2009 at 8:13 PM, mr.freeze wrote: > >> >> Yes, but having no default means that the user will be required to >> actively choose. I like that. Anyway, i'm splitting hairs. Thanks >> for the patch. >> >> On Nov 22, 7:59 pm, mdipierro wrote: >> > Because IS_IN_SET(,multiple=False) implies an exclusive choice. In >> > this case you must use radio buttons, not checkboxes. >> > >> > On Nov 22, 6:13 pm, "mr.freeze" wrote: >> > >> > > It works now. >> > >> > > > This was wrong to begin with. It is not clear if this should be >> > >> > > I don't understand. The example is a valid form. The only problem was >> > > that it had an error div for each checkbox. Why is it wrong? >> > >> > > On Nov 22, 5:55 pm, mdipierro wrote: >> > >> > > > lol. Please check again the code in trunk. Anyway, reading again the >> > > > original post... >> > >> > > > > form = SQLFORM.factory(Field('multiple_options', >> requires=IS_IN_SET(('Hi', >> > > > > 'Milk', 'Mom', 'Love', 'Santa')), >> widget=SQLFORM.widgets.checkboxes.widget)) >> > >> > > > This was wrong to begin with. It is not clear if this should be >> > >> > > > form = SQLFORM.factory(Field('multiple_options', >> requires=IS_IN_SET >> > > > (('Hi', >> > > > 'Milk', 'Mom', 'Love', 'Santa'),multiple=True), >> > > > widget=SQLFORM.widgets.checkboxes.widget)) >> > >> > > > or >> > >> > > > form = SQLFORM.factory(Field('multiple_options', >> requires=IS_IN_SET >> > > > (('Hi', >> > > > 'Milk', 'Mom', 'Love', 'Santa'),default='Hi'), >> > > > widget=SQLFORM.widgets.radio.widget)) >> > >> > > > none of which should require the patch in trunk. >> > > > Only case checkboxes may need to report an error is if one is >> > > > tampering with the form or if one is setting weird constraints like >> > > > "select any two of the following". >> > >> > > > Massimo >> > >> > > > On Nov 22, 5:24 pm, "mr.freeze" wrote: >> > >> > > > > You fixed it too much :) It doesn't give an error at all now. >> > >> > > > > On Nov 22, 3:48 pm, mdipierro wrote: >> > >> > > > > > Can you please check the fix in trunk? >> > >> > > > > > Massimo >> > >> > > > > > On Nov 21, 6:51 pm, mdipierro wrote: >> > >> > > > > > > well' This is a bug. I think the proper fix would be to edit >> html.py >> > > > > > > and make sure that only checked boxes display the error. >> > >> > > > > > > On Nov 21, 6:15 pm, "mr.freeze" wrote: >> > >> > > > > > > > Here's a lame workaround. It's a widget that removes all of >> the error >> > > > > > > > divs except the last one: >> > >> > > > > > > > def checkboxes_widget(f,v): >> > > > > > > > wrapper = DIV(_id="%s_wrapper" % f.name) >> > > > > > > > inp = SQLFORM.widgets.checkboxes.widget(f,v) >> > > > > > > > scr = >> SCRIPT('jQuery("div[id=\'%s__error\']").slice(0,-1).remove >> > > > > > > > ();' % >> > > > > > > > f.name,_type="text/javascript") >> > > > > > > > wrapper.components.extend([inp,scr]) >> > > > > > > > return wrapper >> > >> > > > > > > > On Nov 21, 3:45 pm, Thadeus Burgess >> wrote: >> > >> > > > > > > > > form = SQLFORM.factory(Field('multiple_options', >> requires=IS_IN_SET(('Hi', >> > > > > > > > > 'Milk', 'Mom', 'Love', 'Santa')), >> widget=SQLFORM.widgets.checkboxes.widget)) >> > >> > > > > > > > > Submit the form without selecting anything, and it >> displays the error >> > > > > > > > > message on each INPUT() helper. >> > >> > > > > > > > > You can also change widget to SQLFORM.widgets.radio.widget >> and it will have >> > > > > > > > > the same effect. >> > >> > > > > > > > > -Thadeus >> > >> > > > > > > > > On Sat, Nov 21, 2009 at 3:35 PM, mr.freeze < >> nat...@freezable.com> wrote: >> > >> > > > > > > > > > Can you post some example code that produces the effect? >> Just want to >> > > > > > > > > > make sure I'm understanding the problem correctly. >> > >> > > > > > > > > > On Nov 21, 1:55 pm, Thadeus Burgess < >> thade...@thadeusb.com> wrote: >> > > > > > > > > > >http://static.thadeusb.com/web2py_checkboxes_fail.png >> > >> > > > > > > > > > > Pleeaze fix!!! >> > >> > > > > > > > > > > I have a patch, but it is not backwards-compatible. >> > >> > > > > > > > > > > Is this an area where it is a bug, or a feature to >> have multiple error >> > > > > > > > > > > messages for checkboxes/radio widgets? >> > >> > > > > > > > > > > -Thadeus >> > >> > >> --~--~-~--~~~---~--~~ >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To post to this group, send email to web2py@googlegroups.com >> To unsubscribe from this group, send email to >> web2py+unsubscr...@googlegroups.com >> For more options, visi
[web2py:36133] Re: Plugin Central
Looks great! On Nov 28, 1:57 pm, Thadeus Burgess wrote: > Hello everyone, > > Ok I am putting the finishing touches on our new web2py plugin hosting site. > > Could everyone take a look at it, let me know what you think, and reply to > this thread for any comments or suggestions. I will not get a chance to > update it until next weekend, but would love to start gathering a list of > things that could be done better. > > You can start uploading some packed plug-ins to try the site out, however it > is just running off the demo SQLITE database, which will be scrubbed when > the site goes official. > > As a note, the plug-ins that are already in the database are test files, and > do not actually contain anything. > > http://plugincentral.thadeusb.com/ > > Hope you enjoy! > > Thanks, > > -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36134] Re: Plugin Central
Just fixed a couple of bugs :P Search should be working again, so should creation of plugins -Thadeus On Sat, Nov 28, 2009 at 8:08 PM, mr.freeze wrote: > Looks great! > > On Nov 28, 1:57 pm, Thadeus Burgess wrote: > > Hello everyone, > > > > Ok I am putting the finishing touches on our new web2py plugin hosting > site. > > > > Could everyone take a look at it, let me know what you think, and reply > to > > this thread for any comments or suggestions. I will not get a chance to > > update it until next weekend, but would love to start gathering a list of > > things that could be done better. > > > > You can start uploading some packed plug-ins to try the site out, however > it > > is just running off the demo SQLITE database, which will be scrubbed when > > the site goes official. > > > > As a note, the plug-ins that are already in the database are test files, > and > > do not actually contain anything. > > > > http://plugincentral.thadeusb.com/ > > > > Hope you enjoy! > > > > Thanks, > > > > -Thadeus > > -- > > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36135] Traceback on IS_NOT_IN_DB
Could anybody explain the following traceback to me? db.define_table... Field('slug', unique=True, required=True), ) db.page.slug.requires = IS_NOT_IN_DB(db, 'page.slug') form = SQLFORM.factory(db.page.slug, Field('tags')) Produces the following error on form.accepts(), works fine if without the validator Traceback (most recent call last): File "/home/thadeusb/Applications/web2py/gluon/restricted.py", line 184, in restricted exec ccode in environment File "/home/thadeusb/Applications/web2py/applications/thadeusb0/controllers/weblog.py", line 198, in File "/home/thadeusb/Applications/web2py/gluon/globals.py", line 103, in self._caller = lambda f: f() File "/home/thadeusb/Applications/web2py/applications/thadeusb0/controllers/weblog.py", line 96, in test if form.accepts(request.vars, session): File "/home/thadeusb/Applications/web2py/gluon/sqlhtml.py", line 775, in accepts onvalidation, File "/home/thadeusb/Applications/web2py/gluon/html.py", line 1270, in accepts status = self._traverse(status) File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in _traverse newstatus = c._traverse(status) and newstatus File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in _traverse newstatus = c._traverse(status) and newstatus File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in _traverse newstatus = c._traverse(status) and newstatus File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in _traverse newstatus = c._traverse(status) and newstatus File "/home/thadeusb/Applications/web2py/gluon/html.py", line 459, in _traverse newstatus = self._validate() File "/home/thadeusb/Applications/web2py/gluon/html.py", line 1077, in _validate (value, errors) = validator(value) File "/home/thadeusb/Applications/web2py/gluon/validators.py", line 403, in __call__ rows = self.dbset(field == value).select(limitby=(0, 1)) File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 2941, in select query = self._select(*fields, **attributes) File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 2828, in _select fields = [self._db[table].ALL for table in self._tables] File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 1231, in __getitem__ return dict.__getitem__(self, str(key)) KeyError: 'no_table' -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36136] Re: Omit default controller for for any action
On Nov29, 2:11am, Alex wrote: > Is there any way to omit default controller name in URL if there is > appropriate default controller action, like it's done for index action > but to work for any default controller action? Create a routes.py in your web2py directory. See web2py/ route.example.py for detail. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36137] Re: domain hostname in routes.py
in routes.py routes_out=(('/domain_app_name/$anything','$anything'),) On Nov 28, 11:08 am, Alex wrote: > Actually i'm using nginx with mod_proxy > > This helped me with nginx for incoming requests: > > rewrite ^(.*)$ /domain_app_name$1 last; > > but how to change "out" url generation to do not include > app name "domain_app_name" in all links? > > On Nov 28, 6:48 pm, mdipierro wrote: > > > You can but strongly suggest you use virtual hosts in apache + > > mod_wsgi + mod_rewrite. It will give you more flexibility in the long > > run. > > > Massimo > > > On Nov 28, 10:31 am, Alex wrote: > > > > Hello, > > > > I want to run one web2py instance where each web2py application > > > will be mapped to different domain and with ability to map some urls > > > differently in different domains. > > > > I tried to edit routes.py but without success. > > > > Can anyone show examples of such routes.py? > > > > Thanks. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36138] Re: web2py on Apache Tomcat
You can run on apache http://web2py.com/examples/static/web2py_manual_cut.pdf but apache tomcat (as far as I understand) is JSP. web2py runs on Python, not Java. On Nov 28, 11:56 am, haftish21 wrote: > Is Web2py deployable on Apache tomcat, can anyone help?? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36139] Re: Disable registrations
auth.settings.actions_disabled.append('register') On Nov 28, 12:38 pm, Thadeus Burgess wrote: > What is the most seem-less way to disable user registration system. In a > system where you only need one user and don't want anyone else to join. > > -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36140] Re: SQLForm (set custom css classes to specified elements)
This makes a good point. On Nov 28, 2:36 pm, waTR wrote: > Correct. Design is out-sourced to a designer. Logic code is being done > by me. Main issue going forward will be with service contracts with > outsourced work. It's like voiding a warranty on a hard-drive in your > computer if you open it and modify anything. > > On Nov 28, 9:36 am, Thadeus Burgess wrote: > > > The reason is he had a outsourced designer make all of the stylesheets. He > > would have to either rewrite those stylesheets to accommodate web2py, or > > change web2py to accommodate those spreadsheets. From the sound of it, there > > are tons of form spreadsheets and would be quite tedious to alter them. > > > This is where having the ability to customize css attributes during form > > creation would be "nice". > > > -Thadeus > > > On Sat, Nov 28, 2009 at 3:07 AM, mdipierro wrote: > > > Why do you need classes to style the default widgets? > > > They are very simple, they basically just have an INPUT so you can do > > > > form['_class']='myclass' > > > > .myclass INPUT#name { > > > ... style of the INPUT in the widget name in form... > > > } > > > > There is nothing you cannot already do in CSS. > > > > Massimo > > > > On Nov 27, 11:19 pm, waTR wrote: > > > > That sounds like it might work. I will look into it. > > > > > Re: jQuery > > > > It becomes very messy when you have to do that. It is fine when the > > > > developer does the design and coding, but when working in a team you > > > > can't do that. You need to have a system in place where you have to do > > > > minimal modification/additional code to make the design work with the > > > > already enormous amounts of logic code. > > > > > It should be built into the SQLFORM widget object. It doesn't seem so > > > > complicated to do. I will look into it and see. > > > > > Though I am not intending to do anything that would affect backward > > > > compatibility here, this is rather a simple modification of what is > > > > already there and maybe add an additional optional field that takes a > > > > dictionary to modify the dictionary created by SQLFORM.custom.widget > > > > > On Nov 27, 5:58 pm, Thadeus Burgess wrote: > > > > > > Try actually overriding the form widgets. > > > > > > So you can override SQLFORM.widgets dictionary with your custom ones > > > that > > > > > define your own classes. > > > > > > You can see example widgets on web2pyslices.com for this purpose. > > > > > > -Thadeus > > > > > > On Fri, Nov 27, 2009 at 7:35 PM, mdipierro > > > wrote: > > > > > > I am not sure this is a good idea. It is not necessary for the > > > purpose > > > > > > of customization > > > > > > Moreover you can do it with jQuery > > > > > > > jQuery('#table_password').addCladd('custom_1'); > > > > > > > On Nov 27, 6:55 pm, waTR wrote: > > > > > > > I am wondering if anyone is working on adding a capability to set > > > > > > > a > > > > > > > class for a single element in an SQLForm.custom.widget out of > > > however > > > > > > > many are passed to it from a db.table. I.e. > > > > > > > > You have a table named USER with Name, Email, Password. > > > > > > > Set Name to class = "password OR string OR whatever is > > > > > > > default + custom_1 custom_2 custom_n". In addition, would be > > > nice > > > > > > > to have access to size="" of as well. > > > > > > > > If no one is working on anything like this, I am interested in > > > taking > > > > > > > a stab into this darkness... > > > > > > > > Let me know if no one is working on this and I will put forward my > > > > > > > proposed design modification (in english, not code). If there is > > > > > > > no > > > > > > > cries of outrage I will get it coded. Otherwise, I guess I might > > > just > > > > > > > do it for my local copy only. I really need this facility to speed > > > up > > > > > > > my forms creation--my app has a hundred or so, and all the CSS has > > > > > > > been done by an outside designer. I really don't want to modify > > > > > > > his > > > > > > > design or CSS links. I just want to be able to plug the Input > > > fields > > > > > > > and have the form start working. > > > > > > > -- > > > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > > "web2py-users" group. > > > > > > To post to this group, send email to web...@googlegroups.com. > > > > > > To unsubscribe from this group, send email to > > > > > > web2py+unsubscr...@googlegroups.com > > > > > > > > > > . > > > > > > For more options, visit this group at > > > > > >http://groups.google.com/group/web2py?hl=en. > > > > -- > > > > You received this message because you are subscribed to the Google Groups > > > "web2py-users" group. > > > To post to this group, send email to web...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > web2py+unsubscr...@googlegroups.com > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/web2py?hl=en. > > -- Yo
[web2py:36141] Re: Plugin Central
good job! I will be contributing some more plugins soon. On Nov 28, 8:22 pm, Thadeus Burgess wrote: > Just fixed a couple of bugs :P Search should be working again, so should > creation of plugins > > -Thadeus > > On Sat, Nov 28, 2009 at 8:08 PM, mr.freeze wrote: > > Looks great! > > > On Nov 28, 1:57 pm, Thadeus Burgess wrote: > > > Hello everyone, > > > > Ok I am putting the finishing touches on our new web2py plugin hosting > > site. > > > > Could everyone take a look at it, let me know what you think, and reply > > to > > > this thread for any comments or suggestions. I will not get a chance to > > > update it until next weekend, but would love to start gathering a list of > > > things that could be done better. > > > > You can start uploading some packed plug-ins to try the site out, however > > it > > > is just running off the demo SQLITE database, which will be scrubbed when > > > the site goes official. > > > > As a note, the plug-ins that are already in the database are test files, > > and > > > do not actually contain anything. > > > >http://plugincentral.thadeusb.com/ > > > > Hope you enjoy! > > > > Thanks, > > > > -Thadeus > > > -- > > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36142] Weird form session activity?
I have been noticing that forms seem to get stuck. Using SQLFORM.factory, it seems that under certain cases the form freezes, when you submit the form, it acts as if form.accepts() has failed, this is most likely due to double submission, since removing session from form.accepts() the form will work again. I am running on latest trunk, and forms that worked flawlessly before seem to get stuck like this until either A) session files are deleted or B) web2py is restarted. It might just be something I am doing, but just putting it out there to see if anybody else has experienced this. -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36143] Re: Traceback on IS_NOT_IN_DB
well. It is a bug. I think I fixed it in trunk. Please give it a try and let us know. Massimo On Nov 28, 8:36 pm, Thadeus Burgess wrote: > Could anybody explain the following traceback to me? > > db.define_table... > > Field('slug', unique=True, required=True), > > > ) > > db.page.slug.requires = IS_NOT_IN_DB(db, 'page.slug') > > form = SQLFORM.factory(db.page.slug, Field('tags')) > > Produces the following error on form.accepts(), works fine if without the > validator > > Traceback (most recent call last): > File "/home/thadeusb/Applications/web2py/gluon/restricted.py", line 184, > in restricted > exec ccode in environment > File > "/home/thadeusb/Applications/web2py/applications/thadeusb0/controllers/weblog.py", > line 198, in > File "/home/thadeusb/Applications/web2py/gluon/globals.py", line 103, in > > self._caller = lambda f: f() > File > "/home/thadeusb/Applications/web2py/applications/thadeusb0/controllers/weblog.py", > line 96, in test > if form.accepts(request.vars, session): > File "/home/thadeusb/Applications/web2py/gluon/sqlhtml.py", line 775, in > accepts > onvalidation, > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 1270, in > accepts > status = self._traverse(status) > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in > _traverse > newstatus = c._traverse(status) and newstatus > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in > _traverse > newstatus = c._traverse(status) and newstatus > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in > _traverse > newstatus = c._traverse(status) and newstatus > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in > _traverse > newstatus = c._traverse(status) and newstatus > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 459, in > _traverse > newstatus = self._validate() > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 1077, in > _validate > (value, errors) = validator(value) > File "/home/thadeusb/Applications/web2py/gluon/validators.py", line 403, > in __call__ > rows = self.dbset(field == value).select(limitby=(0, 1)) > File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 2941, in > select > query = self._select(*fields, **attributes) > File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 2828, in > _select > fields = [self._db[table].ALL for table in self._tables] > File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 1231, in > __getitem__ > return dict.__getitem__(self, str(key)) > KeyError: 'no_table' > > -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36144] Re: Encoding problem (bug?)
uploading to trunk. Thanks. On Nov 28, 2:28 pm, Francisco Ribeiro wrote: > hi > > Nice! Thank you for the attention. There is a good reason that I'm sure you > deeply understand for me to be less connected... I've been finishing my mst. > thesis. Work done, presentation finished more time free. > Meanwhile, I've been working on some interesting projects including web2py > based. > > I've been digging on this problem and found out the source. > It has to do with the lack of encoding definition in the Translation files. > I added "#coding: utf8" and it temporarly worked, until I've added a new T() > entry in the code which made web2py to rewrite the T files (so it would > include the new key) and then the first line gone making the proper encoding > go away. > > this can be considered a fix and it's backward compatible. > > A nice solution would be to define somewhere an encoding to apply to an > application. > > translations_encoding.patch > < 1KViewDownload -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36145] Re: SQLForm (set custom css classes to specified elements)
So any chance a patch will be made? I have been trying to make the modification myself, however, I am coming from C++ so I am not yet used to the art of Python function/ method arguments. I am trying to add a argument to FormWidget so it takes another argument called "stylized={}" before **attributes. However, when I do a type(stylized), it keeps telling me it is a gluon.sql.Field type... I think I am trying to use static typing and python keeps kicking my butt for it;) On Nov 28, 8:06 pm, mdipierro wrote: > This makes a good point. > > On Nov 28, 2:36 pm, waTR wrote: > > > Correct. Design is out-sourced to a designer. Logic code is being done > > by me. Main issue going forward will be with service contracts with > > outsourced work. It's like voiding a warranty on a hard-drive in your > > computer if you open it and modify anything. > > > On Nov 28, 9:36 am, Thadeus Burgess wrote: > > > > The reason is he had a outsourced designer make all of the stylesheets. He > > > would have to either rewrite those stylesheets to accommodate web2py, or > > > change web2py to accommodate those spreadsheets. From the sound of it, > > > there > > > are tons of form spreadsheets and would be quite tedious to alter them. > > > > This is where having the ability to customize css attributes during form > > > creation would be "nice". > > > > -Thadeus > > > > On Sat, Nov 28, 2009 at 3:07 AM, mdipierro > > > wrote: > > > > Why do you need classes to style the default widgets? > > > > They are very simple, they basically just have an INPUT so you can do > > > > > form['_class']='myclass' > > > > > .myclass INPUT#name { > > > > ... style of the INPUT in the widget name in form... > > > > } > > > > > There is nothing you cannot already do in CSS. > > > > > Massimo > > > > > On Nov 27, 11:19 pm, waTR wrote: > > > > > That sounds like it might work. I will look into it. > > > > > > Re: jQuery > > > > > It becomes very messy when you have to do that. It is fine when the > > > > > developer does the design and coding, but when working in a team you > > > > > can't do that. You need to have a system in place where you have to do > > > > > minimal modification/additional code to make the design work with the > > > > > already enormous amounts of logic code. > > > > > > It should be built into the SQLFORM widget object. It doesn't seem so > > > > > complicated to do. I will look into it and see. > > > > > > Though I am not intending to do anything that would affect backward > > > > > compatibility here, this is rather a simple modification of what is > > > > > already there and maybe add an additional optional field that takes a > > > > > dictionary to modify the dictionary created by SQLFORM.custom.widget > > > > > > On Nov 27, 5:58 pm, Thadeus Burgess wrote: > > > > > > > Try actually overriding the form widgets. > > > > > > > So you can override SQLFORM.widgets dictionary with your custom ones > > > > that > > > > > > define your own classes. > > > > > > > You can see example widgets on web2pyslices.com for this purpose. > > > > > > > -Thadeus > > > > > > > On Fri, Nov 27, 2009 at 7:35 PM, mdipierro > > > > wrote: > > > > > > > I am not sure this is a good idea. It is not necessary for the > > > > purpose > > > > > > > of customization > > > > > > > Moreover you can do it with jQuery > > > > > > > > jQuery('#table_password').addCladd('custom_1'); > > > > > > > > On Nov 27, 6:55 pm, waTR wrote: > > > > > > > > I am wondering if anyone is working on adding a capability to > > > > > > > > set a > > > > > > > > class for a single element in an SQLForm.custom.widget out of > > > > however > > > > > > > > many are passed to it from a db.table. I.e. > > > > > > > > > You have a table named USER with Name, Email, Password. > > > > > > > > Set Name to class = "password OR string OR whatever is > > > > > > > > default + custom_1 custom_2 custom_n". In addition, would > > > > > > > > be > > > > nice > > > > > > > > to have access to size="" of as well. > > > > > > > > > If no one is working on anything like this, I am interested in > > > > taking > > > > > > > > a stab into this darkness... > > > > > > > > > Let me know if no one is working on this and I will put forward > > > > > > > > my > > > > > > > > proposed design modification (in english, not code). If there > > > > > > > > is no > > > > > > > > cries of outrage I will get it coded. Otherwise, I guess I might > > > > just > > > > > > > > do it for my local copy only. I really need this facility to > > > > > > > > speed > > > > up > > > > > > > > my forms creation--my app has a hundred or so, and all the CSS > > > > > > > > has > > > > > > > > been done by an outside designer. I really don't want to modify > > > > > > > > his > > > > > > > > design or CSS links. I just want to be able to plug the Input > > > > fields > > > > > > > > and have the form start working. > > > > > > > > -- > > > > > > > > You received this message because you are subscribed
Re: [web2py:36146] Re: Traceback on IS_NOT_IN_DB
Working now. Thanks. Any idea about freezing sessions from my other post? -Thadeus On Sat, Nov 28, 2009 at 10:35 PM, mdipierro wrote: > well. It is a bug. I think I fixed it in trunk. Please give it a try > and let us know. > > Massimo > > On Nov 28, 8:36 pm, Thadeus Burgess wrote: > > Could anybody explain the following traceback to me? > > > > db.define_table... > > > > Field('slug', unique=True, required=True), > > > > > > ) > > > > db.page.slug.requires = IS_NOT_IN_DB(db, 'page.slug') > > > > form = SQLFORM.factory(db.page.slug, Field('tags')) > > > > Produces the following error on form.accepts(), works fine if without the > > validator > > > > Traceback (most recent call last): > > File "/home/thadeusb/Applications/web2py/gluon/restricted.py", line > 184, > > in restricted > > exec ccode in environment > > File > > > "/home/thadeusb/Applications/web2py/applications/thadeusb0/controllers/weblog.py", > > line 198, in > > File "/home/thadeusb/Applications/web2py/gluon/globals.py", line 103, > in > > > > self._caller = lambda f: f() > > File > > > "/home/thadeusb/Applications/web2py/applications/thadeusb0/controllers/weblog.py", > > line 96, in test > > if form.accepts(request.vars, session): > > File "/home/thadeusb/Applications/web2py/gluon/sqlhtml.py", line 775, > in > > accepts > > onvalidation, > > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 1270, in > > accepts > > status = self._traverse(status) > > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in > > _traverse > > newstatus = c._traverse(status) and newstatus > > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in > > _traverse > > newstatus = c._traverse(status) and newstatus > > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in > > _traverse > > newstatus = c._traverse(status) and newstatus > > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 452, in > > _traverse > > newstatus = c._traverse(status) and newstatus > > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 459, in > > _traverse > > newstatus = self._validate() > > File "/home/thadeusb/Applications/web2py/gluon/html.py", line 1077, in > > _validate > > (value, errors) = validator(value) > > File "/home/thadeusb/Applications/web2py/gluon/validators.py", line > 403, > > in __call__ > > rows = self.dbset(field == value).select(limitby=(0, 1)) > > File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 2941, in > > select > > query = self._select(*fields, **attributes) > > File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 2828, in > > _select > > fields = [self._db[table].ALL for table in self._tables] > > File "/home/thadeusb/Applications/web2py/gluon/sql.py", line 1231, in > > __getitem__ > > return dict.__getitem__(self, str(key)) > > KeyError: 'no_table' > > > > -Thadeus > > -- > > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36147] Re: Weird form session activity?
I do not know. If more people experience this problem, please let me know as many details as you can. Massimo On Nov 28, 10:17 pm, Thadeus Burgess wrote: > I have been noticing that forms seem to get stuck. Using SQLFORM.factory, it > seems that under certain cases the form freezes, when you submit the form, > it acts as if form.accepts() has failed, this is most likely due to double > submission, since removing session from form.accepts() the form will work > again. > > I am running on latest trunk, and forms that worked flawlessly before seem > to get stuck like this until either A) session files are deleted or B) > web2py is restarted. > > It might just be something I am doing, but just putting it out there to see > if anybody else has experienced this. > > -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36148] Re: SQLForm (set custom css classes to specified elements)
Nevermind, I got it. I was mixing up things at the function call not in the arguments. On Nov 28, 8:57 pm, waTR wrote: > So any chance a patch will be made? > > I have been trying to make the modification myself, however, I am > coming from C++ so I am not yet used to the art of Python function/ > method arguments. > > I am trying to add a argument to FormWidget so it takes another > argument called "stylized={}" before **attributes. > > However, when I do a type(stylized), it keeps telling me it is a > gluon.sql.Field type... > > I think I am trying to use static typing and python keeps kicking my > butt for it;) > > On Nov 28, 8:06 pm, mdipierro wrote: > > > This makes a good point. > > > On Nov 28, 2:36 pm, waTR wrote: > > > > Correct. Design is out-sourced to a designer. Logic code is being done > > > by me. Main issue going forward will be with service contracts with > > > outsourced work. It's like voiding a warranty on a hard-drive in your > > > computer if you open it and modify anything. > > > > On Nov 28, 9:36 am, Thadeus Burgess wrote: > > > > > The reason is he had a outsourced designer make all of the stylesheets. > > > > He > > > > would have to either rewrite those stylesheets to accommodate web2py, or > > > > change web2py to accommodate those spreadsheets. From the sound of it, > > > > there > > > > are tons of form spreadsheets and would be quite tedious to alter them. > > > > > This is where having the ability to customize css attributes during form > > > > creation would be "nice". > > > > > -Thadeus > > > > > On Sat, Nov 28, 2009 at 3:07 AM, mdipierro > > > > wrote: > > > > > Why do you need classes to style the default widgets? > > > > > They are very simple, they basically just have an INPUT so you can do > > > > > > form['_class']='myclass' > > > > > > .myclass INPUT#name { > > > > > ... style of the INPUT in the widget name in form... > > > > > } > > > > > > There is nothing you cannot already do in CSS. > > > > > > Massimo > > > > > > On Nov 27, 11:19 pm, waTR wrote: > > > > > > That sounds like it might work. I will look into it. > > > > > > > Re: jQuery > > > > > > It becomes very messy when you have to do that. It is fine when the > > > > > > developer does the design and coding, but when working in a team you > > > > > > can't do that. You need to have a system in place where you have to > > > > > > do > > > > > > minimal modification/additional code to make the design work with > > > > > > the > > > > > > already enormous amounts of logic code. > > > > > > > It should be built into the SQLFORM widget object. It doesn't seem > > > > > > so > > > > > > complicated to do. I will look into it and see. > > > > > > > Though I am not intending to do anything that would affect backward > > > > > > compatibility here, this is rather a simple modification of what is > > > > > > already there and maybe add an additional optional field that takes > > > > > > a > > > > > > dictionary to modify the dictionary created by SQLFORM.custom.widget > > > > > > > On Nov 27, 5:58 pm, Thadeus Burgess wrote: > > > > > > > > Try actually overriding the form widgets. > > > > > > > > So you can override SQLFORM.widgets dictionary with your custom > > > > > > > ones > > > > > that > > > > > > > define your own classes. > > > > > > > > You can see example widgets on web2pyslices.com for this purpose. > > > > > > > > -Thadeus > > > > > > > > On Fri, Nov 27, 2009 at 7:35 PM, mdipierro > > > > > > > > > > > > wrote: > > > > > > > > I am not sure this is a good idea. It is not necessary for the > > > > > purpose > > > > > > > > of customization > > > > > > > > Moreover you can do it with jQuery > > > > > > > > > jQuery('#table_password').addCladd('custom_1'); > > > > > > > > > On Nov 27, 6:55 pm, waTR wrote: > > > > > > > > > I am wondering if anyone is working on adding a capability to > > > > > > > > > set a > > > > > > > > > class for a single element in an SQLForm.custom.widget out of > > > > > however > > > > > > > > > many are passed to it from a db.table. I.e. > > > > > > > > > > You have a table named USER with Name, Email, Password. > > > > > > > > > Set Name to class = "password OR string OR whatever is > > > > > > > > > default + custom_1 custom_2 custom_n". In addition, > > > > > > > > > would be > > > > > nice > > > > > > > > > to have access to size="" of as well. > > > > > > > > > > If no one is working on anything like this, I am interested in > > > > > taking > > > > > > > > > a stab into this darkness... > > > > > > > > > > Let me know if no one is working on this and I will put > > > > > > > > > forward my > > > > > > > > > proposed design modification (in english, not code). If there > > > > > > > > > is no > > > > > > > > > cries of outrage I will get it coded. Otherwise, I guess I > > > > > > > > > might > > > > > just > > > > > > > > > do it for my local copy only. I really need this facility to > > > > > > > > > speed > > > > > up > > > > > > > > >
[web2py:36149] sqlite encryption + web2py
Hello Massimo, I found an open source SQLite extension that provides 256 AES encryption of database files. site: http://zetetic.net/software/sqlcipher github: http://github.com/sjlombardo/sqlcipher license: http://zetetic.net/page_attachments//0309/sqlcipher-license2009.txt Is there a way to integrate this into web2py? Thanks -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36150] Re: web2py on Apache Tomcat
Can Jython not be used as intermediary. http://skunkyjay.wordpress.com/2009/06/12/web2py-now-works-with-jython/ You would just need a WSGI adapter for Jython that can interact with Tomcat API. Graham On Nov 29, 3:04 pm, mdipierro wrote: > You can run on apache > > http://web2py.com/examples/static/web2py_manual_cut.pdf > > but apache tomcat (as far as I understand) is JSP. web2py runs on > Python, not Java. > > On Nov 28, 11:56 am, haftish21 wrote: > > > > > Is Web2py deployable on Apache tomcat, can anyone help?? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36151] Re: SQLForm (set custom css classes to specified elements)
Patch sent. I will post a web2pyslice tutorial tomorrow. On Nov 28, 9:21 pm, waTR wrote: > Nevermind, I got it. I was mixing up things at the function call not > in the arguments. > > On Nov 28, 8:57 pm, waTR wrote: > > > So any chance a patch will be made? > > > I have been trying to make the modification myself, however, I am > > coming from C++ so I am not yet used to the art of Python function/ > > method arguments. > > > I am trying to add a argument to FormWidget so it takes another > > argument called "stylized={}" before **attributes. > > > However, when I do a type(stylized), it keeps telling me it is a > > gluon.sql.Field type... > > > I think I am trying to use static typing and python keeps kicking my > > butt for it;) > > > On Nov 28, 8:06 pm, mdipierro wrote: > > > > This makes a good point. > > > > On Nov 28, 2:36 pm, waTR wrote: > > > > > Correct. Design is out-sourced to a designer. Logic code is being done > > > > by me. Main issue going forward will be with service contracts with > > > > outsourced work. It's like voiding a warranty on a hard-drive in your > > > > computer if you open it and modify anything. > > > > > On Nov 28, 9:36 am, Thadeus Burgess wrote: > > > > > > The reason is he had a outsourced designer make all of the > > > > > stylesheets. He > > > > > would have to either rewrite those stylesheets to accommodate web2py, > > > > > or > > > > > change web2py to accommodate those spreadsheets. From the sound of > > > > > it, there > > > > > are tons of form spreadsheets and would be quite tedious to alter > > > > > them. > > > > > > This is where having the ability to customize css attributes during > > > > > form > > > > > creation would be "nice". > > > > > > -Thadeus > > > > > > On Sat, Nov 28, 2009 at 3:07 AM, mdipierro > > > > > wrote: > > > > > > Why do you need classes to style the default widgets? > > > > > > They are very simple, they basically just have an INPUT so you can > > > > > > do > > > > > > > form['_class']='myclass' > > > > > > > .myclass INPUT#name { > > > > > > ... style of the INPUT in the widget name in form... > > > > > > } > > > > > > > There is nothing you cannot already do in CSS. > > > > > > > Massimo > > > > > > > On Nov 27, 11:19 pm, waTR wrote: > > > > > > > That sounds like it might work. I will look into it. > > > > > > > > Re: jQuery > > > > > > > It becomes very messy when you have to do that. It is fine when > > > > > > > the > > > > > > > developer does the design and coding, but when working in a team > > > > > > > you > > > > > > > can't do that. You need to have a system in place where you have > > > > > > > to do > > > > > > > minimal modification/additional code to make the design work with > > > > > > > the > > > > > > > already enormous amounts of logic code. > > > > > > > > It should be built into the SQLFORM widget object. It doesn't > > > > > > > seem so > > > > > > > complicated to do. I will look into it and see. > > > > > > > > Though I am not intending to do anything that would affect > > > > > > > backward > > > > > > > compatibility here, this is rather a simple modification of what > > > > > > > is > > > > > > > already there and maybe add an additional optional field that > > > > > > > takes a > > > > > > > dictionary to modify the dictionary created by > > > > > > > SQLFORM.custom.widget > > > > > > > > On Nov 27, 5:58 pm, Thadeus Burgess wrote: > > > > > > > > > Try actually overriding the form widgets. > > > > > > > > > So you can override SQLFORM.widgets dictionary with your custom > > > > > > > > ones > > > > > > that > > > > > > > > define your own classes. > > > > > > > > > You can see example widgets on web2pyslices.com for this > > > > > > > > purpose. > > > > > > > > > -Thadeus > > > > > > > > > On Fri, Nov 27, 2009 at 7:35 PM, mdipierro > > > > > > > > > > > > > > wrote: > > > > > > > > > I am not sure this is a good idea. It is not necessary for the > > > > > > purpose > > > > > > > > > of customization > > > > > > > > > Moreover you can do it with jQuery > > > > > > > > > > jQuery('#table_password').addCladd('custom_1'); > > > > > > > > > > On Nov 27, 6:55 pm, waTR wrote: > > > > > > > > > > I am wondering if anyone is working on adding a capability > > > > > > > > > > to set a > > > > > > > > > > class for a single element in an SQLForm.custom.widget out > > > > > > > > > > of > > > > > > however > > > > > > > > > > many are passed to it from a db.table. I.e. > > > > > > > > > > > You have a table named USER with Name, Email, Password. > > > > > > > > > > Set Name to class = "password OR string OR whatever > > > > > > > > > > is > > > > > > > > > > default + custom_1 custom_2 custom_n". In addition, > > > > > > > > > > would be > > > > > > nice > > > > > > > > > > to have access to size="" of as well. > > > > > > > > > > > If no one is working on anything like this, I am interested > > > > > > > > > > in > > > > > > taking > > > > > > > > > > a stab into this d
[web2py:36152] Re: web2py on Apache Tomcat
Is there a wsgi adaptor for Jython? I should mention that although web2py works with jython2.5rc2 (that is what I used in my tests at the time)m I do not consider it a production alternative because: - users have preported problems with web2py jython 2.5 stable - the problems are related to a Java bug in regular expressions that SUN is not planning to fix - it is slow compared with c-python Massimo On Nov 28, 11:23 pm, Graham Dumpleton wrote: > Can Jython not be used as intermediary. > > http://skunkyjay.wordpress.com/2009/06/12/web2py-now-works-with-jython/ > > You would just need a WSGI adapter for Jython that can interact with > Tomcat API. > > Graham > > On Nov 29, 3:04 pm, mdipierro wrote: > > > You can run on apache > > >http://web2py.com/examples/static/web2py_manual_cut.pdf > > > but apache tomcat (as far as I understand) is JSP. web2py runs on > > Python, not Java. > > > On Nov 28, 11:56 am, haftish21 wrote: > > > > Is Web2py deployable on Apache tomcat, can anyone help?? > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36153] Re: multiple validations problem
I am actually having this problem with IS_NOT_IN_DB for updating records... Just attempting to use my basic slug example in my other post. -Thadeus On Fri, Nov 27, 2009 at 10:34 AM, mdipierro wrote: > > If a validator has a method set_self_id, it is called automatically by > web2py upon edit. > > > On Nov 27, 10:22 am, __Kyo__ wrote: > > Hi thanks a lot for the help, i put this code in my model, and it runs > > fine. > > > > inventory=db().select(db.Inventory.ALL) > > for i in inventory: > > if db((i.idProducto==db.Inventory.idProduct)& > > (i.idCountry==db.Inventory.idCountry)).count()>1: > > db(db.Inventory.id == i.id).delete() > > > > However I'd like to learn how modify the class becouse i think is the > > best way to do it. I can't understand the code a lot. So please, > > how do i edit this code for settings the id of the current record you > > can prevent the check on update? > > > > def set_self_id(self, id): > > self.record_id = id > > > > On 27 nov, 01:41, mdipierro wrote: > > > > > Look into gluon.validators.IS_NOT_IN_DB > > > > > specifically: > > > > > def set_self_id(self, id): > > > self.record_id = id > > > > > By settings the id of the current record you can prevent the check on > > > update. > > > > > Massimo > > > > > On Nov 26, 4:32 pm, __Kyo__ wrote: > > > > > > Hi, i use this code in my application, it works very good when i > > > > insert a new record, but i have a little problem when i want to > update > > > > a registry. For example: > > > > > > I have un my table inventory: product, country, quantity > > > > > > If i insert pencil, canada, 40 it inserts fine > > > > > > then if i want to insert again pencil, canada, 50 it doesnt insert > > > > beacuse i already have pencils in canada. This is working fine. > > > > > > My problem is here, in the update. For example > > > > > > I want to update my number of pencils in Canada, beacause i buy > > > > another 50 pencils. I put update > > > > pencil, canada, 90 > > > > > > But it says it already have pencils in canada, its like i am > inserting > > > > a new registry and not doing an update. How can i solve this? > > > > > > This is my validator, is in the model: > > > > > > class IS_NOT_IN_DB_DDOWN_UIM(IS_IN_DB): > > > > def __init__(self,*a,**b): > > > > IS_IN_DB.__init__(self,*a,**b) > > > > def __call__(self,value): > > > > e=IS_IN_DB.__call__(self,value) > > > > if e[1]:return e e=IS_NOT_IN_DB(db > > > > > (db.Inventory.idProduct==request.vars.idProduct),'Inventory.idCountry',error_message=self.error_message) > > > > (value) > > > > return e > > > > > > db.Inventory.idCountry.requires=IS_NOT_IN_DB_DDOWN_UIM > > > > (db,'Country.id','%(nCountry)s',error_message="The product is already > > > > in this country.")- Ocultar texto de la cita - > > > > > - Mostrar texto de la cita - > > > > > > -- > > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36154] Re: multiple validations problem
I am attempting to use row.update_record() -Thadeus On Sun, Nov 29, 2009 at 1:30 AM, Thadeus Burgess wrote: > I am actually having this problem with IS_NOT_IN_DB for updating records... > > Just attempting to use my basic slug example in my other post. > > -Thadeus > > > > > > On Fri, Nov 27, 2009 at 10:34 AM, mdipierro wrote: > >> >> If a validator has a method set_self_id, it is called automatically by >> web2py upon edit. >> >> >> On Nov 27, 10:22 am, __Kyo__ wrote: >> > Hi thanks a lot for the help, i put this code in my model, and it runs >> > fine. >> > >> > inventory=db().select(db.Inventory.ALL) >> > for i in inventory: >> > if db((i.idProducto==db.Inventory.idProduct)& >> > (i.idCountry==db.Inventory.idCountry)).count()>1: >> > db(db.Inventory.id == i.id).delete() >> > >> > However I'd like to learn how modify the class becouse i think is the >> > best way to do it. I can't understand the code a lot. So please, >> > how do i edit this code for settings the id of the current record you >> > can prevent the check on update? >> > >> > def set_self_id(self, id): >> > self.record_id = id >> > >> > On 27 nov, 01:41, mdipierro wrote: >> > >> > > Look into gluon.validators.IS_NOT_IN_DB >> > >> > > specifically: >> > >> > > def set_self_id(self, id): >> > > self.record_id = id >> > >> > > By settings the id of the current record you can prevent the check on >> > > update. >> > >> > > Massimo >> > >> > > On Nov 26, 4:32 pm, __Kyo__ wrote: >> > >> > > > Hi, i use this code in my application, it works very good when i >> > > > insert a new record, but i have a little problem when i want to >> update >> > > > a registry. For example: >> > >> > > > I have un my table inventory: product, country, quantity >> > >> > > > If i insert pencil, canada, 40 it inserts fine >> > >> > > > then if i want to insert again pencil, canada, 50 it doesnt insert >> > > > beacuse i already have pencils in canada. This is working fine. >> > >> > > > My problem is here, in the update. For example >> > >> > > > I want to update my number of pencils in Canada, beacause i buy >> > > > another 50 pencils. I put update >> > > > pencil, canada, 90 >> > >> > > > But it says it already have pencils in canada, its like i am >> inserting >> > > > a new registry and not doing an update. How can i solve this? >> > >> > > > This is my validator, is in the model: >> > >> > > > class IS_NOT_IN_DB_DDOWN_UIM(IS_IN_DB): >> > > > def __init__(self,*a,**b): >> > > > IS_IN_DB.__init__(self,*a,**b) >> > > > def __call__(self,value): >> > > > e=IS_IN_DB.__call__(self,value) >> > > > if e[1]:return e e=IS_NOT_IN_DB(db >> > > > >> (db.Inventory.idProduct==request.vars.idProduct),'Inventory.idCountry',error_message=self.error_message) >> > > > (value) >> > > > return e >> > >> > > > db.Inventory.idCountry.requires=IS_NOT_IN_DB_DDOWN_UIM >> > > > (db,'Country.id','%(nCountry)s',error_message="The product is >> already >> > > > in this country.")- Ocultar texto de la cita - >> > >> > > - Mostrar texto de la cita - >> > >> > >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To post to this group, send email to web...@googlegroups.com. >> To unsubscribe from this group, send email to >> web2py+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/web2py?hl=en. >> >> >> > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36155] js functions from controller
Web2py view is successfully calling an online javascritpt library under
Re: [web2py:36156] Re: multiple validations problem
Actually, the problem is I am using an IS_NOT_IN_DB with an SQLFORM.factory. Then I use update_record. -Thadeus On Sun, Nov 29, 2009 at 1:37 AM, Thadeus Burgess wrote: > I am attempting to use > > row.update_record() > > -Thadeus > > > > > > On Sun, Nov 29, 2009 at 1:30 AM, Thadeus Burgess wrote: > >> I am actually having this problem with IS_NOT_IN_DB for updating >> records... >> >> Just attempting to use my basic slug example in my other post. >> >> -Thadeus >> >> >> >> >> >> On Fri, Nov 27, 2009 at 10:34 AM, mdipierro wrote: >> >>> >>> If a validator has a method set_self_id, it is called automatically by >>> web2py upon edit. >>> >>> >>> On Nov 27, 10:22 am, __Kyo__ wrote: >>> > Hi thanks a lot for the help, i put this code in my model, and it runs >>> > fine. >>> > >>> > inventory=db().select(db.Inventory.ALL) >>> > for i in inventory: >>> > if db((i.idProducto==db.Inventory.idProduct)& >>> > (i.idCountry==db.Inventory.idCountry)).count()>1: >>> > db(db.Inventory.id == i.id).delete() >>> > >>> > However I'd like to learn how modify the class becouse i think is the >>> > best way to do it. I can't understand the code a lot. So please, >>> > how do i edit this code for settings the id of the current record you >>> > can prevent the check on update? >>> > >>> > def set_self_id(self, id): >>> > self.record_id = id >>> > >>> > On 27 nov, 01:41, mdipierro wrote: >>> > >>> > > Look into gluon.validators.IS_NOT_IN_DB >>> > >>> > > specifically: >>> > >>> > > def set_self_id(self, id): >>> > > self.record_id = id >>> > >>> > > By settings the id of the current record you can prevent the check on >>> > > update. >>> > >>> > > Massimo >>> > >>> > > On Nov 26, 4:32 pm, __Kyo__ wrote: >>> > >>> > > > Hi, i use this code in my application, it works very good when i >>> > > > insert a new record, but i have a little problem when i want to >>> update >>> > > > a registry. For example: >>> > >>> > > > I have un my table inventory: product, country, quantity >>> > >>> > > > If i insert pencil, canada, 40 it inserts fine >>> > >>> > > > then if i want to insert again pencil, canada, 50 it doesnt insert >>> > > > beacuse i already have pencils in canada. This is working fine. >>> > >>> > > > My problem is here, in the update. For example >>> > >>> > > > I want to update my number of pencils in Canada, beacause i buy >>> > > > another 50 pencils. I put update >>> > > > pencil, canada, 90 >>> > >>> > > > But it says it already have pencils in canada, its like i am >>> inserting >>> > > > a new registry and not doing an update. How can i solve this? >>> > >>> > > > This is my validator, is in the model: >>> > >>> > > > class IS_NOT_IN_DB_DDOWN_UIM(IS_IN_DB): >>> > > > def __init__(self,*a,**b): >>> > > > IS_IN_DB.__init__(self,*a,**b) >>> > > > def __call__(self,value): >>> > > > e=IS_IN_DB.__call__(self,value) >>> > > > if e[1]:return e e=IS_NOT_IN_DB(db >>> > > > >>> (db.Inventory.idProduct==request.vars.idProduct),'Inventory.idCountry',error_message=self.error_message) >>> > > > (value) >>> > > > return e >>> > >>> > > > db.Inventory.idCountry.requires=IS_NOT_IN_DB_DDOWN_UIM >>> > > > (db,'Country.id','%(nCountry)s',error_message="The product is >>> already >>> > > > in this country.")- Ocultar texto de la cita - >>> > >>> > > - Mostrar texto de la cita - >>> > >>> > >>> >>> -- >>> >>> You received this message because you are subscribed to the Google Groups >>> "web2py-users" group. >>> To post to this group, send email to web...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> web2py+unsubscr...@googlegroups.com >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/web2py?hl=en. >>> >>> >>> >> > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.