[web2py] Re: Modifying A helper callback behavior
hi, i face the same problem too in web2py 2.9.12-stable in web2py 2.9.11-stable didn't found the problem the button is not back after the user clicked, please see attached file. the left square is appear when clicked more than 1 times. the right square is appear when clicked one time. any idea how to solve this? thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: parse a json response in views
Does this help? onchange=jQuery(gaslists).empty();jQuery.getJSON('prices', jQuery('[name=station_name]').val(), function(data){alert(data.diesel);}); On Saturday, 21 February 2015 23:33:09 UTC-6, CC J wrote: Hi I submit a request to the web2py server onchange=jQuery(gaslists).empty();ajax('prices', ['station_name'], 'shadow_clone'); My controller returns return XML(listing) In Firefox developer I receive a response {'ulp': '124.90', 'diesel': '126.90', 'autogas': '54.90'} I've a mental block when it comes to extracting the values and displaying them in my page. Help appreciated CCJ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Save variable in view from controllers and models for further math and other manipulation
In your case categores is a DAL rows object. there are many things you can do with in the view: 1) embed it {{=categories}} 2) loop over the Rows ul {{for row in categories:}} li{{=row.name}}/li {{pass}} /lu 3) convert it into a json table script var categories = {{=XML(categories.as_json())}}; /script 4) I understand you are using this: http://www.decalage.info/en/python/html In that case you have to convert the Rows object into a python list of lists (table?) table_data = [[row.id, row.name, ...] for row in categories]] than in view: {{=XML(*HTML.table*(table_data))}} Hope this helps. On Sunday, 22 February 2015 20:09:33 UTC-6, Abhijit Chatterjee wrote: This is not the right way to use web2py view but there is a html.py package that converts table and list to html automatically. I am trying to use that to see if it works out in web2py. More for an experiment than anything. This question may be more of a python question than web2py but here it is: In web2py controller I have category defined (This is an example from reddit clone that Massimo presented) *def categories():categories = dbOBJECT(dbOBJECT.category).select(orderby=dbOBJECT.category.name http://dbobject.category.name/)return locals()* In the view when I do the following it display the categories (since its same as response.write) : {{=categories}} I can see the following in html (see below). does someone know how would I save that categories in a variable in the view (.html page) to create a table variable? ' Lets say save it in variable = ['Entertainment', 'News', 'Sports'] without using for loops {{from category in categories}}? Any example you can point me to? *category.id* http://category.id/*category.name* http://category.name/ 1Entertainment2News3 Sports The idea would be to cat few of these tables together and use HTML.table (variable) to display in the view without ever to use html syntax. Not sure if its possible and probably not recommended, but wanted to try for fun. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Create many similar forms on one page
hi everybody I am trying to figure out how to create many forms that are similar on one page. The idea is to have people comment on various sections of a page with text. This means that, each section has its comments. The forms are the same with a comment field and a submit button. This is the code i got so far. However it does not work and i definitely need to understand how this can be achieved in a simple way. Can somebody help me figure this out. In controller: allforms=dict(form_id=new_form_id(),form=SQLFORM(db.manyforms)) for f in allforms: if f['form'].accepts(request.vars,formname=f['form_id']): response.flash = 'accepted' else: response.flash = 'refused' return dict(allforms=allforms) In model: db.define_table('manyforms', Field('comment')) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Session folder size
i think web2py admin already have it when you press the clean on admin interface it said : cache, errors and sessions cleaned best regards, stifan On Monday, February 23, 2015 at 4:50:44 PM UTC+7, Ramos wrote: there should be an admin button to clean that session garbage, as we already have to clean errors. 2015-02-23 9:33 GMT+00:00 Annet anne...@googlemail.com javascript:: Hi, I had an issue with the sessions2trash.py file which Niphlod fixed last week. The sessions2trash.py script posted here works: https://www.dropbox.com/s/4080g390sa5byw6/sessions2trash.py?dl=0 Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Create many similar forms on one page
perhaps you can use load component ref: http://www.web2py.com/books/default/chapter/29/12/components-and-plugins#LOAD best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: how to change grid name?
No you have to specify plural in the table. No other way. On Saturday, 21 February 2015 15:40:37 UTC-6, Oliver Holloway wrote: Thanks! Now that I've build my own view, the grid variable is no longer displaying. The pluralized table name is still showing, so I did some reading, and found that this is a special property of the smartgrid gadget http://www.web2py.com/books/default/chapter/35/07/forms-and-validators#SQLFORM-grid-and-SQLFORM-smartgrid--experimental-, that it *wants *to display the table name, and is able to guess the singular and plural names from the table name. We can specify in the define_table statement what we want the singular and plural to be, and when I specify *plural=''* then that tag stops showing. Groovy. Is there a way to do this in the smartgrid args? For example, the headers argument allows one to rename field names. If not, no worries, as I will be using grid for most of my app so that I can send queries. Thanks again. On Thursday, February 19, 2015 at 11:17:32 PM UTC-5, Massimo Di Pierro wrote: You are using the generic.html view. That only works in development and it is not a recommended policy in production. It is telling you that you have a variable called grid and displaying the object. You need to make your own view and embed the grid with {{=grid}} so that it won't display the name of the variable (grid). -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Session folder size
Yes, I know it's available on admin but trying to automate the process. I'm running web2py on windows so it sounds like I can create a .bat file to run the sessions2trash.py command. On Monday, February 23, 2015 at 7:28:13 AM UTC-6, 黄祥 wrote: i think web2py admin already have it when you press the clean on admin interface it said : cache, errors and sessions cleaned best regards, stifan On Monday, February 23, 2015 at 4:50:44 PM UTC+7, Ramos wrote: there should be an admin button to clean that session garbage, as we already have to clean errors. 2015-02-23 9:33 GMT+00:00 Annet anne...@googlemail.com: Hi, I had an issue with the sessions2trash.py file which Niphlod fixed last week. The sessions2trash.py script posted here works: https://www.dropbox.com/s/4080g390sa5byw6/sessions2trash.py?dl=0 Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: IMPORTANT - WEB2PY CONSULTING
Massimo, please add my company: Name: Sonne Tech Website: www.sonnetech.com.br Country: Brazil. Thanks! Em domingo, 15 de fevereiro de 2015 20:21:36 UTC-2, Massimo Di Pierro escreveu: We need to update the list of companies that provide web2py consulting. This list is obsolete: http://web2py.com/init/default/support Some links are broke. Most pages do not even mention web2py. Some of them have a design that is simply not acceptable for a web development company. That list will be eliminated. IF YOU WANT TO BE LISTED please update your page to have a decent design and MENTION WEB2PY on the main site. Then respond to this thread by providing an updated link and the country were you incorporated. If you have a self-employed individual list your country of residence. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Search for fields with multiple values (list:string) in SQLFORM?
Hello everyone, I really enjoy using the SQLFORM, however I've noticed when I convert fields to list:string I can no longer search by those specific fields. Is this something I could fix in SQLFORM? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Why to always digitally sign ajax calls?
It is not about what is more secure. the serve a different purpose. The signature makes sure the action that generate the signature is called before the action that checks the signature and prevents changes in the get parameters. On Sunday, 22 February 2015 23:26:17 UTC-6, Robin Manoli wrote: Hi! I'm wondering about this example from the book. Would it be less secure to just decorate two with @auth.requires_login, even if it's used for an ajax call? Or is it made like this to explicitly not require login for two? @auth.requires_login() def one(): return dict(link=URL('two', vars=dict(a=123), user_signature=True) @auth.requires_signature() def two(): # do something return locals() Thanks for your help! -- Robin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Create many similar forms on one page
This is really helpful. i can easily post for a single section. However for multiple sections, i am still trying to figure it out. Thanks so much. On Monday, 23 February 2015 15:24:19 UTC+2, 黄祥 wrote: perhaps you can use load component ref: http://www.web2py.com/books/default/chapter/29/12/components-and-plugins#LOAD best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: no email field in auth_user
Thanks guys for all the help. I checked my program again and now it works: db2.auth_user.email.readable = False db2.auth_user.email.writable = False were the solution. The email field is not shown as I did wish. My fault, I was checking the password field! (sorry, I was confused). Regards. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] importing .csv to create DAL object
If I have an old site n mysql database. N want to convert to web2py, rather than typing up the entire Database from scratch, is there a way that I export the existing mysql database to a csv n then import that .csv file to DAL to create the database automatically? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Header for selectable
Did you find how to do this? I too would like to have a header for the selectable column. Shown below is how I'm defining it. I know how to use headers to control table field headers, but I have failed to find how to control the checkbox column header. If there's no way to do that, no worries, just curious. def next_sessions(): grid = SQLFORM.grid( (db.sessions.session_date_time_start=datetime.date.today()) (db.sessions.session_date_time_start=datetime.date.today() + datetime.timedelta(days=7)), user_signature=False, csv=False, searchable=False, #user_sig false only during this stage of dev selectable=lambda ids: [redirect(URL('default','get_program_sessions', vars=dict(id=ids)))] ) return locals() On Wednesday, August 14, 2013 at 9:16:56 AM UTC-4, Leonardo Pires Felix wrote: How put a header on selectable column on SQLFORM.grid? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Session folder size
BTW, the admin interface cleanup process is just something people would hit before packing the app. It just zaps errors, sessions and cache folders. it's not meant to be run on production. @omichiba: perfect. I run such a task weekly in the prod env (10-15 apps, 200 users) and that's more than enough. On Monday, February 23, 2015 at 2:55:01 PM UTC+1, Omi Chiba wrote: Yes, I know it's available on admin but trying to automate the process. I'm running web2py on windows so it sounds like I can create a .bat file to run the sessions2trash.py command. On Monday, February 23, 2015 at 7:28:13 AM UTC-6, 黄祥 wrote: i think web2py admin already have it when you press the clean on admin interface it said : cache, errors and sessions cleaned best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: sessions2trash.py
now it's in trunk, so next releases will be fine. On Monday, February 23, 2015 at 10:31:09 AM UTC+1, Annet wrote: Hi Niphlod, Thanks for the time and effort you put into fixing this issue, the dropbox script does clean up de folder structure. Best, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Manual--image blog--groups--manager members
Instructions in the manual chapter called Overview: Using appadmin create a group manager and make some users members of the group. They will be able to access http://127.0.0.1:8000/images/default/manage; I don't know what this means. I can get to appadmin: http://127.0.0.1:8000/images/appadmin where I see a list of existing tables: db.image http://127.0.0.1:8000/images/appadmin/select/db?query=db.image.id%3E0 db.post http://127.0.0.1:8000/images/appadmin/select/db?query=db.post.id%3E0 db.auth_user http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_user.id%3E0 db.auth_group http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_group.id%3E0 db.auth_membership http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_membership.id%3E0 db.auth_permission http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_permission.id%3E0 db.auth_event http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_event.id%3E0 db.auth_cas http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_cas.id%3E0 I have already made three users and I assume one should be made manager and the others members, but do I make a new table for this or use db.auth_group? I know a little sql and a little python, but very very newbie. I have considerable familiarity with html, css, and was getting pretty deep into beginner javascript when I decided php was not for me and switched to python, which eventually led me to web2py since other avenues seemed not promising for my high level of inexperience. http://web2py.com/books/default/chapter/29/3#An-image-blog -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: parse a json response in views
Thanks I think I found the solution with :eval: onchange=jQuery(gaslists).empty();ajax('prices', ['station_name'], ':eval' ); and in the controller return jQuery('#target').html(%s); % repr(str(row.db_ulp_price)) I must read read read the docs On Sunday, February 22, 2015 at 3:33:09 PM UTC+10, CC J wrote: Hi I submit a request to the web2py server onchange=jQuery(gaslists).empty();ajax('prices', ['station_name'], 'shadow_clone'); My controller returns return XML(listing) In Firefox developer I receive a response {'ulp': '124.90', 'diesel': '126.90', 'autogas': '54.90'} I've a mental block when it comes to extracting the values and displaying them in my page. Help appreciated CCJ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] on CheckboxesWidget styles
Hello all, while using the checkboxes widget I noticed that for style='ul' it generates a bunch of UL elements each with a single LI, instead of the single UL with a bunch of nested LI elements that I expected to see. Changing the ul wrapper from (DIV, UL, LI) to (UL, LI, TAG[''] ) would solve the above issue but there is no easy way to supply your own style. Some quick testing code follows (it does not seem to matter if the field type is a list or not but both cases are present): ss='one two three four five'.split() db.define_table('t1', Field('s1',requires=IS_EMPTY_OR(IS_IN_SET(ss,multiple=False,zero=None))), Field('s2','list:string',requires=IS_EMPTY_OR(IS_IN_SET(ss,multiple=True,zero=None db.t1.s1.widget=lambda f,v:SQLFORM.widgets.checkboxes.widget(f,v,style='ul') db.t1.s2.widget=lambda f,v:SQLFORM.widgets.checkboxes.widget(f,v,style='ul') f=SQLFORM(db.t1) print f Comments?. Regards, Denes -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: importing .csv to create DAL object
you can try to extract models using https://github.com/web2py/web2py/blob/master/scripts/extract_mysql_models.py . To load the data, it'll be best to do the work table by table. On Monday, February 23, 2015 at 9:44:27 PM UTC+1, Abhijit Chatterjee wrote: If I have an old site n mysql database. N want to convert to web2py, rather than typing up the entire Database from scratch, is there a way that I export the existing mysql database to a csv n then import that .csv file to DAL to create the database automatically? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: sessions2trash.py
Hi Niphlod, Thanks for the time and effort you put into fixing this issue, the dropbox script does clean up de folder structure. Best, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Session folder size
Hi, I had an issue with the sessions2trash.py file which Niphlod fixed last week. The sessions2trash.py script posted here works: https://www.dropbox.com/s/4080g390sa5byw6/sessions2trash.py?dl=0 Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] PDF view - set printing page size
I think this could be useful for you: https://github.com/jredrejo/Labels-for-pyfpdf 2015-02-22 9:50 GMT+01:00 Pavel pavel@gmail.com: Hallo, I am making simple app for registrations and printing ID cards. I have simple pdf view. For instance: {{ import os from gluon.contrib.generics import pdf_from_html html = 'Today is: ' + str(request.now) =pdf_from_html(html) }} How to specify PDF page size for instance like credit card size? Thank you very much for any advice. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Session folder size
there should be an admin button to clean that session garbage, as we already have to clean errors. 2015-02-23 9:33 GMT+00:00 Annet anneve...@googlemail.com: Hi, I had an issue with the sessions2trash.py file which Niphlod fixed last week. The sessions2trash.py script posted here works: https://www.dropbox.com/s/4080g390sa5byw6/sessions2trash.py?dl=0 Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Creating my own layout.html, but errors not displaying
Ugh, I thought I copyedited. For clarification: On Monday, February 23, 2015 at 3:58:52 PM UTC-8, the idiot Tom Campbell wrote: Creating my own layout.html based on the AdminLTE theme https://github.com/almasaeed2010/AdminLTE. It works, but errors are not being displayed. For example, I have a notnull*=*True validation rule in the 'description' field of the 'todo' model but if a description isn't *entered*, no .error class div appears. What markup do I need to ensure those errors get shown? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] SQLFORM.grid without database IO
There is a paragraph in the book called SQLFORM without database IO. Is it possible to do the same with a grid? Regards, Martin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] wiki_editor group added to impersonated account
Hi When I access the wiki function with an impersonated account, the impersonated account automatically gets added to the wiki_editor group at least for the duration of the account being impersonated. Is this the desired behaviour? Thanks Calvin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py on Microsoft Azure PAAS
You have probably already come across this post: https://groups.google.com/d/msg/web2py/pkVKXkui7qI/vdKK4YxptZAJ. On Tuesday, February 10, 2015 at 5:33:15 PM UTC+5:30, Gary Cowell wrote: Anyone any experience on deploying a web2py app on Microsoft Azure Web? Can it be done? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Beginner Dropbox question
Am writing app for government agencies to post meeting info for public transparency. Agendas and meeting materials will eventually be many and be large docs, e.g., PowerPoint presentations, graphics, etc, so would like to use Dropbox instead of my app, which is on PythonAnywere. Is it possible to have gov clients upload their docs to my app and have my app automatically post docs to Dropbox so that clients think it's my storage, not Dropbox, and have docs posted to public URL where citizens can find each gov agency's specific meeting info? The goal is not to hide Dropbox partnership, just automate the process so clients only have to register one place, with me, not Dropbox. thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: can't type forward slash in editor
On Saturday, February 21, 2015 at 1:14:45 AM UTC-8, dangne...@juno.com wrote: [...] Side Note: I just watched a series of 5 videos that somebody put on you tube, a presentation Massimo did a while back, and I am happy that I will be able to copy what he did and tweak it to adapt it to my needs. This templating from completed/tested packages is how programming should be taught in my opinion because it is motivating to know that your code should work. And it works because the examples are simple enough, and you may already have the vocabulary needed to understand what is being said. Web2Py is in a very special position in that regards. In fact this is the scientific method: make one change at a time and observe the results. Vs. the university prerequisite mode which filters out impatient people like me who won't sit still for the long way of getting it done by learning how to read minds of teachers who dole out info one drop at a time and make you play guessing games. Some very smart people can't learn that way, but rather need working examples and complete instructions. And others need to have a very strong grounding in the vocabulary and the simplest of lego bricks before they can build cottages, much less castles. Getting to a point where you can appreciate Web2Py may be a significant climb. Thanks to rare philanthropic geniuses like Massimo we can all get to the starting gate a lot quicker and start making things happen. Glad it worked for you. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Modifying A helper callback behavior
i found solution from anthony in another discussion : {{=XML(A(...).xml().replace(' data-w2p_disable_with=default', '') ) }} it strange in 2.9.11 the same code running well but not in 2.9.12 best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] printing from controller
I cant seem to get the debugger to work except 3rd party ide. Does anyone know how to print out a variable from the controler (from default.py). I asked cuz the print function seem dont work there. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Manual--image blog--groups--manager members
On Monday, February 23, 2015 at 3:16:47 AM UTC-8, dangne...@juno.com wrote: Instructions in the manual chapter called Overview: Using appadmin create a group manager and make some users members of the group. They will be able to access http://127.0.0.1:8000/images/default/manage; I don't know what this means. I can get to appadmin: http://127.0.0.1:8000/images/appadmin where I see a list of existing tables: db.image http://127.0.0.1:8000/images/appadmin/select/db?query=db.image.id%3E0 db.post http://127.0.0.1:8000/images/appadmin/select/db?query=db.post.id%3E0 db.auth_user http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_user.id%3E0 db.auth_group http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_group.id%3E0 db.auth_membership http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_membership.id%3E0 db.auth_permission http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_permission.id%3E0 db.auth_event http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_event.id%3E0 db.auth_cas http://127.0.0.1:8000/images/appadmin/select/db?query=db.auth_cas.id%3E0 I have already made three users and I assume one should be made manager and the others members, but do I make a new table for this or use db.auth_group? I believe that what you are being instructed to do is add new records to auth_membership that associate the manager role with one user and the mangement group ID with that user and with the sub-managers. It's been a while since I focused on that exercise, so I'm not quite able to tell you how to do the manager role. One way would be to have a second group ID and add only the more privileged user to that more exclusive group. If the manage group (and, if needed, the real manager group) don't exist, you just make new entries in the auth_group table. I don't hink you need to make any more tables; you're just adding entries to the existing auth mechanisms. Sorry I can't be more precise, but I do hope this helps. I know a little sql and a little python, but very very newbie. I have considerable familiarity with html, css, and was getting pretty deep into beginner javascript when I decided php was not for me and switched to python, which eventually led me to web2py since other avenues seemed not promising for my high level of inexperience. http://web2py.com/books/default/chapter/29/3#An-image-blog Web2Py is easy, and the javascript experience should help you read python, but there is more to it than putting a bulb in a socket and turning the switch :-) I think you'll find that the group here is pretty helpful. I read every post in the hope that I'll absorb some of the wisdom. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Creating my own layout.html, but errors not displaying
Creating my own layout.html based on the AdminLTE theme https://github.com/almasaeed2010/AdminLTE. It works, but errors are not being displayed. For example, I have a notnull*=*True validation rule in the 'description' field of the model model but if a description isn't displayed, not error appears. What markup am I omitting to ensure those errors get shown? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: printing from controller
On Monday, February 23, 2015 at 4:21:14 PM UTC-8, Abhijit Chatterjee wrote: I cant seem to get the debugger to work except 3rd party ide. Does anyone know how to print out a variable from the controler (from default.py). I asked cuz the print function seem dont work there. Python's print command normally talks to the console. I don't use any more IDE than comes with Web2Py, so my console is the shell (terminal session) I started Web2Py from. When I played around with Eclipse (doing Android stuff, not W2P), it put the console stuff in one of its windows, and that might be where print goes for you. If you're referring to a debugger's print function, then I am way behind you so not much help. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] manually update password
Hello! I have an auth_user form with extra fields. To update a record I use a SQLFORM and the update command of DAL instead of the standard update way of SQLFORM. How can I manually update the password field? I receive the actual password from request.vars.password, but I don't know how to save this value in the database. I'm using Web2py 2.9.6. Thanks for any help. Regards. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.